Jump to content

Dynamic subdomains not allowing access to other files


djones

Recommended Posts

I'm forwarding subdomains to a certain page. The problem is it won't give me access to other pages outside that. For example if I try to go to login.php it keeps sending me to company.php. This is what I have so far

 

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(mydomain\.com)$ [NC]
RewriteRule .* http://www.%1%{REQUEST_URI} [R=301]

RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com$ [NC]
RewriteRule .* - [L] 

RewriteCond %{HTTP_HOST} ^(^.*)\.mydomain.com
RewriteRule (.*)  company.php?company=%1 [QSA,L] 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.