Can someone let me know why I can not view my index.php in the subdir /oorbellenboutique/
?
It shows http:// www.oorbellenboutique.nl/startpagina/index.php
, but it should be the index.php from f:/inetpub/wwwroot/oorbellenboutique
The right URL is: http:// www.oorbellenboutique.nl/index.php
My DNS is:
A *.oorbellenboutique.nl → 83.87.163.224
A oorbellenboutique.nl → 83.87.163.224
CNAME www.oorbellenboutique.nl → oorbellenboutique.nl
My URL is: http://www.oorbellenboutique.nl
I am running Apache 2.x
NameVirtualHost 192.168.0.199:80
NameVirtualHost 192.168.0.199:443
<VirtualHost 192.168.0.199:80 192.168.0.199:443>
ServerName oorbellenboutique.nl
ServerAlias www.oorbellenboutique.nl
DocumentRoot f:/inetpub/wwwroot/oorbellenboutique
RewriteEngine On
KeepAlive Off
DocumentRoot "f:/inetpub/wwwroot"
<Directory f:/inetpub/wwwroot/oorbellenboutique>
DirectoryIndex index.php
Order deny,allow
Allow from all
</Directory>
RewriteCond %{HTTP_HOST} ^(?:www\.)?oorbellenboutique\.nl$
ReWriteRule ^(.*) /oorbellenboutique/$1
</virtualhost>
This works however the URL has become:
http:// www.oorbellenboutique.nl/oorbellenboutique/index.php
How do i result in the URL shorter like:
http:// www.oorbellenboutique.nl/index.php
NameVirtualHost 192.168..199:80
NameVirtualHost 192.168..199:443
< VirtualHost 192.168..199:80 192.168..199:443>
ServerName www.oorbellenboutique.nl
ServerAlias *.oorbellenboutique.nl oorbellenboutique.nl
Options +FollowSymLinks
RewriteEngine On
RewriteCond % ^(?:www.)?oorbellenboutique.nl$
<Directory f:/inetpub/wwwroot/oorbellenboutique>
DirectoryIndex index.html index.php
Order deny,allow
Allow from all
</Directory>
RewriteRule ^/$ /oorbellenboutique/ [R]
< /virtualhost>
Try adding a RewriteBase directive rigtht after the RewriteEngine directive:
RewriteBase f:/inetpub/wwwroot
That's different then DocumentRoot for functionality -- it's required for mod_rewrite.