Support » Fixing WordPress » All my WP homepgs direct to 1 specific post

Viewing 8 replies - 1 through 8 (of 8 total)
  • JNashHawkins

    (@jnashhawkins)

    I’m gonna take a stab at this one though I have no experience with CPanel’s redirection (I forgot it was even there). Just never needed it as the times I did need that ability I was used to doing it outside of CPanel.

    I imagine that works via htaccess in the domain referenced so take a look at your htaccess file for ‘oddpla dot net’ itself (oddpla dot net’s root directory) and see if there isn’t still a directive there for that specific redirect… If not then look at httpd.conf for a redirect line referencing oddpla dot net.

    I’m wondering if CPanel was unable to clean up after itself when you deleted the redirect… possibly due to a change to the htaccess file permissions.

    As far as I know CPanel doesn’t write anything directly to the WordPress system itself so these things have to be done from the Apache/Linux side.

    There is a rewrite engine in WordPress so consider also if you might have reiterated this redirect in the past via a redirect plugin or a premium SEO plugin.

    modernwizardeaa

    (@modernwizardeaa)

    
    RewriteEngine on
    
    RewriteOptions inherit
    RewriteCond %{HTTP_HOST} ^oddpla\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.oddpla\.net$
    RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^/?$ "http\:\/\/oddpla\.net\/modernwizard\/2015\/04\/18\/life\-on\-the\-odd\-planet\/" [R=301,L]
    
    

    @jnashhawkins — thanks for your reply. The code above is what was in my htaccess file, so I deleted it. The redirect still occurs, and I did not reiterate it in the past with a WP plugin.

    Sounds like it might be a httpd.conf problem…?

    JNashHawkins

    (@jnashhawkins)

    See that last rewrite rule?

    RewriteRule ^/?$ "http\:\/\/oddpla\.net\/modernwizard\/2015\/04\/18\/life\-on\-the\-odd\-planet\/" [R=301,L]

    Rem that out or remove it.

    JNashHawkins

    (@jnashhawkins)

    Make sure the htaccess file you are editing is .htaccess (see the dot in front of the file name?).

    You might need to flush your cache when done but you need the rest of everything in your htaccess file.

    Right now your site isn’t working at all from here.

    modernwizardeaa

    (@modernwizardeaa)

    @jnashhawkins — Hmmm I probably shouldn’t have indiscriminately deleted all content from the .htaccess file. Fortunately I had a backup.

    Yes, I was editing the one with the . in front of it.

    I pasted back the original code minus the line that you said to take out. Flushed cache.

    Site is now working for me over here! Is it working for you?
    For example…

    http://oddpla.net/tacky should bring you to something headlined “the tacky trove.”

    JNashHawkins

    (@jnashhawkins)

    I was able to get to the three sites you mentioned but I couldn’t get anything from oddpla.net itself. Is that intentional?

    I expected something to be there but maybe not…

    Anyway, it looks like it’s working fine.

    modernwizardeaa

    (@modernwizardeaa)

    @jnashhawkins — there is currently nothing at oddpla.net because I would like to redirect to that specific blog post, but now I’m wary of doing it because it messed up before. Thanks for checking the other URLs.

    JNashHawkins

    (@jnashhawkins)

    Try this line (these lines to keep the rem statement)…

    # Permanent URL redirect - generated by www.rapidtables.com
    Redirect 301 / http://oddpla.net/modernwizard/2015/04/18/life-on-the-odd-planet/
    

    Put it in where you had…

    RewriteRule ^/?$ "http\:\/\/oddpla\.net\/modernwizard\/2015\/04\/18\/life\-on\-the\-odd\-planet\/" [R=301,L]

    Here’s a link to that nice rewrite tool in case you ever need it again.

    https://www.rapidtables.com/web/tools/redirect-generator.html

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.