Redirect Old urls to new urls via htaccess

Posted by Thorpe Obazee on Stack Overflow See other posts from Stack Overflow or by Thorpe Obazee
Published on 2011-01-02T18:32:25Z Indexed on 2011/01/02 18:53 UTC
Read the original article Hit count: 257

Filed under:

I currently have a bunch of urls to redirect to their new urls: I basically have to remove 'blog' from the start and add the 'uri' in there:

redirect 301 /blog/posts/view/follow-twitter http://domain.net/posts/view/uri/follow-twitter

redirect 301 /blog/posts/view/around-the-corner http://domain.net/posts/view/uri/around-the-corner

This is the rest of the .htaccess I have:

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

© Stack Overflow or respective owner

Related posts about .htaccess