How do I get apache RewriteRule working correctly for a subdomain?
Posted
by mike
on Stack Overflow
See other posts from Stack Overflow
or by mike
Published on 2010-04-22T22:00:02Z
Indexed on
2010/04/22
22:03 UTC
Read the original article
Hit count: 426
apache
|rewriterule
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?
© Stack Overflow or respective owner