we have hundreds of locations and build a separate Page for each in wordpress
(location-in-some-state...): ourdomian.com/location-in-some-state/
Works great.
SEO guys want another page with different design for seo: ourdomain.com/newpage/location-in-some-state
We don't want to change the template because we still use the old one. I am going to build a new page and pull the data with the slug:
'categories'=> 'location-in-some-state',
So I need to redirect ourdomain.com/location-in-some-state to ourdomain.com/newpage/
Something like this but I think there's a infinite loop here
RewriteRule ^newpage/(.*)$ /newpage/ [R=301,NC,L]
Lastly, I need the 'location-in-some-state' for my slug somehow. Can that be moved to a query string or visible in the url but now rewritten? If it can be redirected to /newpage/
and rewritten (visual only) with /newpage/location-in-some-state
, maybe I can pull it out of the URI, or can the URI be sent to a query string?????
Do you mean something like:
RewriteCond $1 !^newpage/
RewriteRule ^(.*)$ /newpage/$1 [L,R=301]