Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Problem with 301 not requested

         

chainazo

2:23 am on Aug 4, 2024 (gmt 0)

Top Contributors Of The Month



I started making a website from scratch and after creating the home page and creating two more pages, these last two pages show a 301 and redirect to themselves. That is, pingdomtools shows me that it loads the url "/something" and quickly redirects to that same page (with the waste of time and the unnecessary since I did not ask for it).
The only one that does not redirect to itself is the home page.
What could be happening?

I only use the contact form 7 plugin.

not2easy

2:46 am on Aug 4, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



WP uses the settings you enter to determine what URL to load. Check your settings. But that is WP, not a website made from scratch.

lucy24

4:45 am on Aug 4, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It can't literally be redirecting to itself, or there would be an endless loop until cut short by the browser after 10 or 20 iterations.

What you probably have is some form of canonicalization redirect. For example, if you request
http://www.example.com/somepage
and the site prefers https (secure) and example.com (no www), the request will be redirected to
https://example.com/somepage

Or if you request
example.com/directory
where that's a real, physical directory, it will be redirecterd to
example.com/directory/

Come back with more information and we can pin it down.

Like not2easy, I’m not sure how “from scratch” and “plugin” fit together.

chainazo

6:01 am on Aug 4, 2024 (gmt 0)

Top Contributors Of The Month



Thanks to both for answering.

Yes, I saw in detail and this is what happens
Or if you request
example.com/directory
where that's a real, physical directory, it will be redirecterd to
example.com/directory/

not2easy

11:52 am on Aug 4, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The permalink structure is whatever you set it up to be, but WP will default to a closing slash for directories, yes.

You can learn the permalink structure options at: [wordpress.org...]

(That 2008 page languishes with http: URLs - but you can get past that)

lesseo

3:05 pm on Aug 5, 2024 (gmt 0)



You may be trying to redirect the same url.

chainazo

10:07 pm on Aug 5, 2024 (gmt 0)

Top Contributors Of The Month



Solved.

How do I give votes?

lucy24

10:39 pm on Aug 5, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do I give votes?
At the top of each individual message, there should be one or two dropdowns: one beginning Msg# (mainly for reporting spam) and the other beginning Like. (You can’t Like your own posts, of course.) If one or both are absent, it means you have to attain some number of posts before you’re allowed to take these actions. The next passing moderator will know what the magic number is.

not2easy

1:53 am on Aug 6, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The next passing moderator will know what the magic number is.
Sorry, I have no idea what the number is. It is a mystery.