View Single Post
Old 09-27-2012, 06:51 AM   PM User | #1
denebx33
New to the CF scene

 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
denebx33 is an unknown quantity at this point
Retain Virtual Subdomain across the website

Hello Guys,

I have the following .htaccess code. The user enters in the address bar the URL: subdomain.domain.com and the apache server redirects to to www.domain.com?index=subdomain.

RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com
RewriteCond %{REQUEST_URI} !^/index$
RewriteCond %{QUERY_STRING} !^c=.
RewriteRule (.*) /index?c=%1 [L]

But i want to modify it and retain the virtual subdomain. For example: subdomain.domain.com/login , subdomain.domain.com/account etc.

Also, I have already enabled Wildcard DNS for virtual sub-domains.

Thank you in advance.
denebx33 is offline   Reply With Quote