Recent Topics

1 Jul 19, 2007 06:17    

My b2evolution Version: 1.10.x

I'm debating renaming an entire blog/stub on my system, and want to set up a permanent redirect for the entire directory/stub and all blogposts in that blog, without having to write a separate 301 for every single post. I'm wondering if this is the correct syntax for the mod_rewrite rule, or is there a better way to do this:

Redirect permanent /stubfile2_OLD ht*p://

Will that rule redirect the old directory name AND all blog posts beneath it (using the same clean URLs) to the new directory/path?

Is "Redirect" the correct way to do this, or should it be a "RedirectMatch permanent" ?

Also, how do I handle the stubfile portion of the htaccess file? Currently it looks like this:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(stubfile1|stubfile2_OLD|stubfile3)(/.*)?$ $1.php
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteCond %{REQUEST_URI} ^.*comment_post\.php$

Now, let's say that in regards to the Redirect part above, stubfile2_OLD is the blog which is going to be renamed. If I rename stubfile2_OLD in the RewriteRule to stubfile2_NEW, will that break the 301 Redirect above, since the stubfile2_OLD which is attempting to be redirected to stubfile2_NEW will no longer exist to be Redirected in the first place? Not sure if I'm explaining that well enough... but basically it's going to be looking for stubfile2_OLD in order to redirect it to stubfile2_NEW, but stubfile2_OLD won't exist anymore in order to be redirected if its name has been changed in the RewriteRule... Is that even an issue?

One other issue is that 1 of the blogposts in stubfile2_OLD is going to be moved to stubfile1 (moved to a completely different blog). How is that handled? Does it need to be a 301 followed by another 301 for that same file? That doesn't seem right...


Form is loading...