Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
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
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:01 AM.


Advertisement
Log in to turn off these ads.