php - Mod rewrite and redirect solution -
we have hundreds of locations , build separate page each in wordpress
(location-in-some-state...): ourdomian.com/location-in-some-state/
works great.
seo guys want page different design seo: ourdomain.com/newpage/location-in-some-state
don't want change template because still use old one. going build new page , pull data slug:
'categories'=> 'location-in-some-state',
so need redirect ourdomain.com/location-in-some-state ourdomain.com/newpage/
something think there's infinite loop here
rewriterule ^newpage/(.*)$ /newpage/ [r=301,nc,l]
lastly, need 'location-in-some-state' slug somehow. can moved query string or visible in url rewritten? if can redirected /newpage/
, rewritten (visual only) /newpage/location-in-some-state
, maybe can pull out of uri, or can uri sent query string?????
do mean like:
rewritecond $1 !^newpage/ rewriterule ^(.*)$ /newpage/$1 [l,r=301]