: RewriteRule working local but not on remote server I have a .htaccess file with one simple RewriteRule: RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)$ ?site= I want to have an url like http://www.example.com/imprint
I have a .htaccess file with one simple RewriteRule:
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ ?site=
I want to have an url like www.example.com/imprint and forward it to www.example.com/?site=imprint
I checked this rule with an RewriteRule tester which gave me the results I want to achieve. On my local development system it works well too.
But on a remote server the URLs just give me a 404 error. Other more simple rewrite rules are working with no problems, so everything must be set up correctly (I think..). The problem is that I don't have access to any error logs or the server configs. So the only thing I can do is to guess...
Can anyone tell me if theres something wrong with this rule? Or anything else I can do or test to solve this? Or has someone an idea what could be wrong on the server?
More posts by @Odierno851
1 Comments
Sorted by latest first Latest Oldest Best
Try slash before the ?, like
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ /?site=
If that doesnt work, try adding [R] after so it will actually rewrite the url and you can see where it goes in your browser url bar
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.