Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Apache .htaccess - [mod_rewrite] Help
Old 12-14-2006, 05:53 PM Apache .htaccess - [mod_rewrite] Help
Kiros72's Avatar
Average Talker

Posts: 18
Name: Kiros
Location: Albany, LA - USA
Trades: 0
Hey, could anyone explain to me what this code do - mainly, the two rules at the end? I'm somewhat new to .htaccess syntax and whatnot

Code:
# subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST} !^domain\.com [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+)\.domain\.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+)\.domain\.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
# end subdomain logic
The problem is my server always sends a "Vary: Host" HTTP header with subdomains. This causes my subdomains to not work correctly with IE and all of it's shell-browsers. I can see that the first two RewriteCond-itions basically exclude the base domain and www prefix - which, possibly by coincidence, do not have the "Vary: " HTTP header problem.

Could anyone confirm what the two rules actually do?

Thanks,
//KiroS
Kiros72 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-15-2006, 07:21 AM Re: Apache .htaccess - [mod_rewrite] Help
Kiros72's Avatar
Average Talker

Posts: 18
Name: Kiros
Location: Albany, LA - USA
Trades: 0
I do need a confirmation sometime soon. My tech support thinks it's my fault and they keep closing my support ticket unless I can supply a reason and a solution... Some tech support...
Kiros72 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Apache .htaccess - [mod_rewrite] Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.55767 seconds with 12 queries