I'm trying to simultaneously do a 301 redirect and imporve my url structure by stripping the get variables.
I recently updated my website and Google has some old pages cached that have since moved. The structure looks like this
wwww.domain.com/locations.asp?zip=10001 <---OLD URL
wwww.domain.com/locations/?zip=10001 <---NEW URL
Right now I'm redirecting the old page to the new using the following line in my .htaccess file:
Redirect 301 /solar_panel_systems_zip.asp /zip-code/
The above works fine but I'd like the URL to be as follows:
wwww.domain.com/locations/zip/10001
I came across this post .htaccess rewrite GET variables and tried this rule but no luck :/
RewriteRule ^([\w\d~%.:_\-]+)$ index.php?page=$1 [NC]
I'm assuming this is because I'm 301 redirecting and doing a rewrite?