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

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -