www.companyname.com/dir1 instead of www.companyname.com/dir1/
If they forget the final slash on the directory, they are then not forwarded anywhere, and send to the main root directory of my hosting account. With the uri in the address bar being all wonky. Something like
www.companyname.com/domains/www.companyname/dir1/
Here is my setup...
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_NAME} ^(www\.)?companyname\.net$ [NC]
RewriteRule ^ - [E=SITE_ADMIN:admin@companyname.net,E=SITE_NAME:www.companyname.net,E=SITE_ROOT:domains/www.companyname]
RewriteCond %{SERVER_NAME} \.?^((server1\.|server4\.|playground\.)companyname)\.net$\.?(:80)?$ [NC]
RewriteRule ^ - [E=SITE_ADMIN:admin@companyname.net,E=SITE_NAME:%1.net,E=SITE_ROOT:domains/%1]
RewriteCond %{SERVER_NAME} ^(www\.)?othercompanyname\.com$ [NC]
RewriteRule ^ - [E=SITE_ADMIN:admin@othercompanyname.com,E=SITE_NAME:www.othercompanyname.com,E=SITE_ROOT:domains/www.othercompanyname]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule !^domains %{ENV:SITE_ROOT}%{REQUEST_URI} [QSA,L]
I have a feeling the fix wouldn't be too hard, I am just missing something. If anyone could point me in the right direction I would be most appreciative.