301 Redirect When WP Is In Sub-Directory
-
Hi
I’ve searched through 301 Redirect threads, but no luck.
My question is about htaccess 301 redirect when the WordPress files are in a sub-directory. (old site pages are .html)1. WordPress isn’t “live” yet, so for development purposes, WordPress URL and Site URL are both currently set to https://DomainName.com/WP_SubDir
2. Permalinks are set to Post Name:
https://DomainName.com/WP_SubDir/sample-post/3. When it’s time to go live, I already know how to copy over index.php and move wp-config.php, etc., then change the Site URL in General Settings, so that’s not an issue.
QUESTION:
Assuming that Site URL will be https://DomainName.com, what is the correct method?Redirect 301 /old.html https://DomainName.com/NewPage.php
OR
Redirect 301 /old.html https://DomainName.com/WP_SubDir/NewPage.php
Thanks in advance for any pointers.
- The topic ‘301 Redirect When WP Is In Sub-Directory’ is closed to new replies.