skip to Main Content

Apache – Pretty URLs with .htaccess rewrite engine

Hej, I'm trying to achieve a pretty urls for my site with rewrite engine. The goal is this - mysite.dk/da, mysite.dk/da/success and mysite.dk/da#scroll. So far my htaccess file looks like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule…

VIEW QUESTION

Apache mod_rewrite rule issue that causes an infinite loop

We must redirect from this URL: https://www.ourdomain.com/event/just-an-event-600922?test=620c3c875ceb1ae584920c04d02bc083 to the same without the query string: https://www.ourdomain.com/event/just-an-event-600922 We've tried with this combination of RewriteCond and RewriteRule: RewriteCond %{QUERY_STRING} ^test=([A-Za-z0-9]+)$ RewriteRule ^event/just-an-event-600922$ https://www.ourdomain.com/event/just-an-event-600922 [L,R=301] But it apparently causes an infinite loop. Any idea…

VIEW QUESTION
Back To Top
Search