Google Answers Logo
View Question
 
Q: httpd.conf rewrite question ( No Answer,   0 Comments )
Question  
Subject: httpd.conf rewrite question
Category: Computers > Operating Systems
Asked by: marcfest-ga
List Price: $50.00
Posted: 18 Nov 2006 07:29 PST
Expires: 26 Nov 2006 07:22 PST
Question ID: 783779
Below is a rewrite-rule for the domain 2q11.com, making it so that
2q11.com/foo is rewritten as www.2q11.com/serve.cgi?foo
<VirtualHost *:80>
DocumentRoot /home/mfest/web/2q11/
ServerName www.2q11.com
RewriteEngine on
RewriteLogLevel 1
RedirectPermanent 2q11.com http://www.2q11.com
RewriteCond %{REQUEST_URI} ^/([^/][^/]*)(/|$)
RewriteRule ^/(.*) http://www.2q11.com/serve.cgi?$1 [L]

Try out www.2q11.com/test as an example. 

Here's the problem: I make it so that in addition foo.2q11.com is
rewritten as www.2q11.com/serve.cgi?foo-- with the exception of foo
being "www" or "".

I tried putting the following both in the core of my httpd.conf
configuration and inside the virtual container for 2q11.com , but each
time it did not work:

RewriteCond %{HTTP_HOST} !www.2q11.com [NC]
RewriteCond %{HTTP_HOST} (.*).2q11.com [NC]
RewriteRule ^http://(.*).2q11.com/$ http://www.2q11.com/serve.cgi?$1 [L]

What's the solution for this problem? Thank you.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy