CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   Retain Virtual Subdomain across the website (http://www.codingforums.com/showthread.php?t=274394)

denebx33 09-27-2012 06:51 AM

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.


All times are GMT +1. The time now is 07:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.