redirect - .htaccess rewrite insert new url segment e.g. www.domain.com/wildcard == www.domain.com/new_segment/wildcard/ -
i globally via htaccess rewrite www.domain.com/wildcard/ == www.domain.com/new_segment/wildcard/ can't seem figure out.
so far, have following:
options +followsymlinks -multiviews rewritecond %{http_host} ^domain\.com$ [or] rewritecond %{http_host} ^www\.domain\.com$ rewriterule ^(.*)$ "http\:\/\/www\.domain\.com\/new_segment\/$1" [r=301,l]
for reason, on initial page load www.domain.com/new_segment/new_segment/ if go www.domain.com/old_segment expect www.domain.com/new_segment/old_segment/ www.domain.com/old_segment/ instead.
any appreciated.
why want that? anyways, can easier putting desired files directory , redirection file on /old_segment /new_segment.
Comments
Post a Comment