htaccess redirects after moving worpress directory
-
I have a basic understanding of htaccess, but not enough to figure out the right way to do this (i hacked it to get it to work, but not the way i wanted, so i’m asking for some help!). I think in this case i really need someone who understands the permalink rewrites and htaccess.
WordPress used to be installed at https://myweb.com/wordpress/
I moved the index.php file to my root so it’s now https://myweb.com/The problem is with the permalinks that others have bookmarked and that have been crawled by search engines.
Old rewrite:
RewriteRule ^wordpress/archives/category/(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]
New rewrite:
RewriteRule ^archives/category/(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]How can i write a redirect that will redirect those going to (for example):
https://myweb.com/wordpress/archives/2005/02/02/test
to:
https://myweb.com/archives/2005/02/02/test
???I thought about:
RewriteRule ^wordpress/archives/category/(.+)/page/?([0-9]{1,})/?$ /archives/category/(.+)/page/?([0-9]{1,})/?$ [QSA,L]Also, if this makes sense, how do i indicate the move is permanent (ie 301)?
Thanks for your help.
- The topic ‘htaccess redirects after moving worpress directory’ is closed to new replies.