Reputation: 55
So I'm using .htaccess to set up 301 redirects on my WP site. On my google search console, it gave me a list of about 30 urls that I'd missed. I added them and everything is working as expected.
One is giving me issues though. "index.htm" was the old file. When I try to redirect that to https://example.com it won't ever let the home page load. I get the too many redirects notice.
The top of my .htaccess file looks like:
# 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
And I'm redirecting like this:
RewriteEngine On
Redirect 301 /oldLink https://example.com/newLink
....
....
....
Admittingly, I know almost nothing about .htaccess so I'm reaching out for help here.
What other information am I leaving out to get to the bottom of this?
Upvotes: 0
Views: 243
Reputation: 86
actually your code redirects but to the same site so again runs htaccess and again redirects , thats why its redirects infinite . you should check redirect url.
Upvotes: 1