Forum Moderators: phranque
#to disable directory browsing
Options All -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} nordicreservation.com$ [NC]
RewriteCond %{REQUEST_URI} !^/nordicreservation/.*$
RewriteRule ^(.*)$ /nordicreservation/$1 [L]
RewriteCond %{HTTP_HOST} hjemmedatahjelpen.no$ [NC]
RewriteCond %{REQUEST_URI} !^/hjemmedatahjelpen/.*$
RewriteRule ^(.*)$ /hjemmedatahjelpen/$1 [L]
When I try to resolve hjemedatahjelpen.no I get the index of nordicreservation, and when I try to resolve nordicreservation.com I get ERR_NAME_NOT_RESOLVED.
RewriteEngine on
#========================================================================
# FIRST Handle the http requests first before removing the additional url junk
#========================================================================
#rule for hjemmedatahjelpen.no to link to hjemmedatahjelpenfolder directory
RewriteCond %{HTTP_HOST} ^(www.)?hjemmedatahjelpen.no$
RewriteCond %{REQUEST_URI} !^/hjemmedatahjelpen/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /hjemmedatahjelpen/$1
#rule for nordicreservation.com to link to nordicreservationfolder directory. Its the same as above just with nordicreservation URL and subfolder
RewriteCond %{HTTP_HOST} ^(www.)?nordicreservation.com$
RewriteCond %{REQUEST_URI} !^/nordicreservation/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /nordicreservation/$1
#==========================================================
# SECOND Remove the additional url junk once the new url is loaded
#==========================================================
#rule for hjemmedatahjelpen url rewrite to remove /hjemmedatahjelpen/index.php from the URL
RewriteCond %{HTTP_HOST} ^(www.)?hjemmedatahjelpen.no$
RewriteRule ^(/)?$ hjemmedatahjelpen/index.php
#rule for nordicreservation url rewrite to remove /nordicreservation/index.php from the URL. Again its the same as above just with the nordicreservation URL and sub folder info.
RewriteCond %{HTTP_HOST} ^(www.)?nordicreservation.com$
RewriteRule ^(/)?$ nordicreservation/index.php
RewriteCond %{HTTP_HOST} nordicreservation.com$ [NC]
RewriteCond %{REQUEST_URI} !^/nordicreservation/.*$
make it look as if the same text can occur twice. Is this about subdirectories for addon domains, where "example.com/blahblah/" = "blahblah.com/" = "blahblah.example.com" ? When I try to resolve hjemedatahjelpen.no I get the index of nordicreservation, and when I try to resolve nordicreservation.com I get ERR_NAME_NOT_RESOLVED.
when I try to resolve nordicreservation.com I get ERR_NAME_NOT_RESOLVED
www.example1.com to www/example1.index
www.example1.com/hi to www/example1/hi
www.example1.com/pictures to www/example1/pictures.index
It does resolve for me when I try to connect, so I find it wierd that it does not resolve for you
Hav also tried this, but now both domains resolve the root/nordicreservation/index.php
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^\.]+)$ $1.php [NC,L]