.htaccess - htacces rewrite - extend url without modifying query -
i want change:
/?q=bla to
/search?q=bla i have placed rule like:
rewriterule ^search?q=(.*)$ /?q=$1 [l] but doesn't work, appreciate help, thanks
you can't match query string using pattern inside rewriterule. need match against %{query_string} var inside rewritecond:
rewritecond %{query_string} ^q= rewriterule ^search$ / [l,qsa] technically, don't need qsa flag, since query strings appended automatically.
Comments
Post a Comment