How do I get apache RewriteRule working correctly for a subdomain
Posted
by yummm
on Server Fault
See other posts from Server Fault
or by yummm
Published on 2010-04-22T23:17:46Z
Indexed on
2010/04/22
23:23 UTC
Read the original article
Hit count: 394
apache
|rewriterules
I just setup a subdomain with the following RewriteCond:
RewriteCond $1 !^search.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?([^/]+)$ search.php?q=$1 [L,NS]
I'm using the same rewrite condition on my main domain and it works perfectly. However, when I set it up on the subdomain, it simply outputs "index.php" when going to http://sub.domain.com
Every page on the subdomain outputs the page name in the body instead of processing the code, except for the search page, which appears to be working correctly.
What can I do to correct this issue?
© Server Fault or respective owner