forward slash or backwards slash in windows
Posted: 14. December 2010 13:16
Hi,
I have run Apache on unix based servers for years I have now loaded xampp on windows server 2008 I have virtual hosts working and love it. I am confused about one thing by convention files in windows are written with \\\ back slash and unix uses // forward slashes I have written my virtual hosts file and tried both directions and it seems to work either way also tried the same in the shebang line in perl scripts it also seems to work both ways which confuses me. could some one look at my Vhosts file and tell me what they think considering I am running Xampp on windows.
<VirtualHost *:80>
#ServerAdmin webmaster@domain.com
ServerName domain.com
ServerAlias domain.com *.domain.com
DocumentRoot "C:/xampp/htdocs/domain.com"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog C:\xampp\htdocs\logs\domain.com\access.log combined
ErrorLog C:\xampp\htdocs\logs\domain.com\error.log
ErrorDocument 404 /missing.html
#ErrorDocument 403 /error403.html
#ErrorDocument 500 /error500.html
#ScriptAlias /cgi-bin/ "C:\xampp\htdocs\domain.com\cgi-bin\"
#<Directory C:\xampp\htdocs\domain.com>
<Directory C:\xampp\htdocs\domain.com\cgi-bin>
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
Options ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
</VirtualHost>
note some lines have forward slashes / and some have back \
Any comments appreciated.
I have run Apache on unix based servers for years I have now loaded xampp on windows server 2008 I have virtual hosts working and love it. I am confused about one thing by convention files in windows are written with \\\ back slash and unix uses // forward slashes I have written my virtual hosts file and tried both directions and it seems to work either way also tried the same in the shebang line in perl scripts it also seems to work both ways which confuses me. could some one look at my Vhosts file and tell me what they think considering I am running Xampp on windows.
<VirtualHost *:80>
#ServerAdmin webmaster@domain.com
ServerName domain.com
ServerAlias domain.com *.domain.com
DocumentRoot "C:/xampp/htdocs/domain.com"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog C:\xampp\htdocs\logs\domain.com\access.log combined
ErrorLog C:\xampp\htdocs\logs\domain.com\error.log
ErrorDocument 404 /missing.html
#ErrorDocument 403 /error403.html
#ErrorDocument 500 /error500.html
#ScriptAlias /cgi-bin/ "C:\xampp\htdocs\domain.com\cgi-bin\"
#<Directory C:\xampp\htdocs\domain.com>
<Directory C:\xampp\htdocs\domain.com\cgi-bin>
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
Options ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
</VirtualHost>
note some lines have forward slashes / and some have back \
Any comments appreciated.