Ask HN: Apache RewriteCond with QueryString

1 points by marvwhere ↗ HN
hey there,

i have a little issue with an Apache Redirect.

old url: domain.com/q.php?q=test&enter=enter

what i want: domain.com/suche/test

what i currently use: RewriteCond %{QUERY_STRING} ^q=(.)enter$ [NC] RewriteRule ^q\.php$ /suche/%1? [NC,L,R=301]

which results in: domain.com/suche/test&enter

why is "^q=(.)&$" not working as a condition?

0 comments

[ 4.7 ms ] story [ 8.0 ms ] thread

No comments yet.