Jump to content
a-ok

[SOLVED] 301 redirect loop on all pages except homepage

Recommended Posts

I know these posts have been created a lot and I've trawled through a bunch and can't seem to find a solution for my current problem.

I moved a PW site from my own DigitalOcean droplet > it's own Droplet and the homepage works fine but every other page gets stuck in a 301 redirect loop.

I used curl to debug it a bit:

curl http://159.65.162.128/products/ -vvv
*   Trying 159.65.162.128...
* TCP_NODELAY set
* Connected to 159.65.162.128 (159.65.162.128) port 80 (#0)
> GET /products/ HTTP/1.1
> Host: 159.65.162.128
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 12 Nov 2019 12:03:55 GMT
< Server: Apache/2.4.41 (Ubuntu)
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< X-Powered-By: ProcessWire CMS
< Set-Cookie: wire=de9ifnvlqr75l546fg66a1tkrd; path=/; HttpOnly
< Upgrade: h2,h2c
< Connection: Upgrade
< Location: /products/
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
< 
* Connection #0 to host 159.65.162.128 left intact

And in the Network tab in Chrome it seems to just keep redirecting to the same page and then eventually errors out.

862364673_Screenshot2019-11-12at12_14_13.thumb.jpg.a68d8eda13e2897f79c67bb1347aafc3.jpg

My .htaccess file is exactly how it was on the other DigitalOcean droplet and I have no idea where to go to now. I don't have any SSL set up yet either so no modifications to any vhosts files.

Any immediate thoughts or has anyone had this issue before?

Share this post


Link to post
Share on other sites
54 minutes ago, dragan said:

@a-ok Works for me... did you fix it?

I just fixed it. Turns out `sudo a2enmod rewrite` wasn't enabled 🤨FOUR HOURS LATER.

Sorry for wasting everyone's time.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...