Mod_rewrite problem

I’ve just moved my server over from another host and decided (foolishly it seems) to rename my MovableType directory from “mt” to “blog”. I want to do a mod_rewrite to redirect URLs from to

I currently have this in my .htaccess file but it’s not working:

[code]#rewrites urls from mt to blog
RewriteEngine On

there is a plus sign before FollowSymlinks below, it’s got stripped out in the post

Options FollowSymlinks
RewriteRule ^/mt(.)*$ /blog$1 [R]
[/code]Also, I want to know whether img tags that are in the posts would be redirected with this or if there is a way to do it. They are all full URLS not relative.

Any ideas anyone?

For what you’re doing, you could just use a redirect instead of incurring the overhead of mod_rewrite:

RedirectMatch /mt(.*) /blog$1 That will work on pages, images, anything with a path beginning with “/mt”.

If you want to use mod_rewrite anyway, remove the leading slash from your rule (yes, you use it for the redirect above, but not for mod_rewrite) and rearrange the parentheses:

RewriteRule ^mt(.*) /blog$1 [R]

If you want useful replies, ask smart questions.

Thanks so much, that (both of them actually, though I used the redirect instead) worked like a charm and fixed up all the images too as you said.