views:

30

answers:

1

How can I go about redirecting my old URLs which would have been: http:// blah.com/some/post/name

to the new URLs which would be: http:// blah.com/new/some/post/name

Is this even possible?

I don't want to simply redirect any requests for the blah.com domain to blah.com/new

I want to make sure the subpath is still attached to the redirect

A: 

Hi,

it should be possible.

Try to put this in your .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/some\/?
RewriteRule (.*) /new/$1 [R=301]
</IfModule>

Try it out and let me know - I haven't had time to test it very thoroughly.

becquerel
Yep, works like a charm... Thanks.
Josh