0

I'm working on a client's site and I've encountered a pretty persistent bug. If I change the permalinks to anything other than "plain", all site links redirect you back to the homepage.

I think this is a database issue but I'm out of my depth since I don't do databases often. But when I built this site I worked with a developer that migrated their sales data out of Prestashop to Woommerce. So I assume something might have happened there? I found another post that says it might be the rewrite_rules table but I'm not seeing any error when I search it. Is there a plugin or tool I could use to isolate what might be causing this weird redirect?

I'm nervous about breaking something so I appreciate any kind of help anyone can offer!

Details: Host: Hostinger | Wordpress Version: 5.5.1 | Woocommerce: 4.4.1 | Wordfence 7.4.11

What I've tried with no success:

  • Deleted htaccess file and made a plain one
  • Turned off/on all plugins
  • Fixed file permissions and cleared all cache in Hostinger
  • Added "s" to site name in Wordpress in case it was SSL issue
  • Updated Wordpress, Woocommerce, and all plugins back in September

Current .htaccess (site changed to 'url.com' until I get client approval):

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

# END WordPress

# Wordfence WAF
<IfModule LiteSpeed>
php_value auto_prepend_file '/url.com/public_html/wordfence-waf.php'
</IfModule>
<IfModule lsapi_module>
php_value auto_prepend_file '/url.com/public_html/wordfence-waf.php'
</IfModule>

# END Wordfence WAF


# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:url.com
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} (www\.)?url.com
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:url.com
  • Did you try to enter some not existing url like "yoururl.com/some_random_stuff" . Are you redirected to the homepage? The normal behaviour would be, that you get an 404 error page. – rank Oct 19 '20 at 10:21
  • No, I didn't try to set a new url or get a 404. I could still access the admin side without error. But all links on the site itself would return me back to the homepage. The only one that would work was https://[url].com/store/all/ And would go right back to working the second I went back to "Plain" permalinks. – hellokevin Oct 21 '20 at 10:48
  • Well, did you try to open in brower : https://[url].com/something_random, to check out if you get the 404 page? Maybe there is a redirect to homepage if you access a 404 page. Would be worth a try looking at this. – rank Oct 21 '20 at 12:17

0 Answers0