.htaccess 301 Redirect from Old HTML Site New Domain = 404
-
I’ve rebuilt an old HTML website in wordpress AND it’s on a new domain, but am having issues with .htaccess files and commands. The top level domain redirects okay. Old, individual sub-pages are redirecting, but keeping to the old path beyond the domain so are throwing back a Redirect Loop error.
For instance:
http://www.olddomain.com Redirects OK to http://www.newdomain.com
but
http://www.olddomain.com/somedirectory/somepage.hmtl is ending up on http://www.newdomain.com/somedirectory/somepage.hmtl and giving a 404.-
Alternatively, I’ve tried putting the redirects in the newdomain.com .htaccess file and removing them from the olddomain (while leaving only the overall domain redirect)
-
I’ve tried that, but putting them UNDERNEATH the WP rewrite code.
-
I’ve tried putting the redirects in BOTH the newdomain.com .htaccess file and old file.
I’ve done alot of searching and can’t seem to find the right solution.
.HTACCESS Contents
OLD SITE+++++++++++++++++++++++++++++
Options +FollowSymLinks
RewriteEngine onRedirect 301 / http://www.newdomain.com/
Redirect 301 /about-us.html http://www.newdomain.com/about-us/
… plus about 70+ additional page redirectsNEW SITE+++++++++++++++++++++++++++++
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
- The topic ‘.htaccess 301 Redirect from Old HTML Site New Domain = 404’ is closed to new replies.