Organizational Research By

Surprising Reserch Topic questions - Question:htaccess - Why aren't my rewrite rules working?

There's some misconfiguration in my htaccess which I can't solve :/

Here's the htaccess:

RewriteEngine on
RewriteRule ^([^\.]+)/?$ index.php?page=$1

rewritecond %{http_host} ^ [NC]
rewriterule ^(.*)$$1 [r=301,L]
The .htaccess actually works fine, except in one case: When I connect to a subpage to the root domain without "www.", like this:
Then the first rule doesn't apply and I get redirected to:
What have I done wrong?? Thanks for any suggestions!

asked Sep 13, 2013 in htaccess by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.