Hi all,
wondering if any experts out there can help me, this is what I want to achieve:
when someone goes to this page: example.com/help.php?page=help%20topic%20one (yes the real page name has spaces!!)
they get rewritten to a friendly URL: example.com/help/help-topic-one
I have got the easy bit done like so:
RewriteCond %{THE_REQUEST} \s/help\.php\?page=(.*)\s [NC]
RewriteRule ^ /help/%1? [R=302,L]
RewriteRule ^help/(.*)$ /help.php?&page=$1 [L]
that redirects the page successfully, but the get string still contains the %20's, anyone know what I can add to my rule to rewrite them to dashes aswell?
thanks in advance!
wondering if any experts out there can help me, this is what I want to achieve:
when someone goes to this page: example.com/help.php?page=help%20topic%20one (yes the real page name has spaces!!)
they get rewritten to a friendly URL: example.com/help/help-topic-one
I have got the easy bit done like so:
RewriteCond %{THE_REQUEST} \s/help\.php\?page=(.*)\s [NC]
RewriteRule ^ /help/%1? [R=302,L]
RewriteRule ^help/(.*)$ /help.php?&page=$1 [L]
that redirects the page successfully, but the get string still contains the %20's, anyone know what I can add to my rule to rewrite them to dashes aswell?
thanks in advance!