Stefanowitsch Posted November 12, 2021 Share Posted November 12, 2021 I created a website in processwire and want to add some 301 redirects due to some changes in the overall structure of the page. In my .htaccess I added some rules like this (I am using the default PW .htacces, starting at Line 164) Redirect 301 /de/women https://mywebsite.de/modewelten/women/ When opening the URL I get a working redirect but the URL suddenly looks like that: https://mywebsite.de/modewelten/women/?it=de/women The page is accessible but I have no Idea why this "it" Parameter is added. Another Problem is this redirect: Redirect 301 /de/bestellungen https://mywebsite.de/kontakt/ When opening the URL i get a redirect which leads to a 404 Page because the URL makes no sense at all: https://mywebsite.de/bestellungen?it=de/bestellungen I have these redirect problems both in my local dev environment and the live server. I found this old thread with the same problem but the solution does not work for me: Link to comment Share on other sites More sharing options...
nurkka Posted November 12, 2021 Share Posted November 12, 2021 You could use the redirects plugin:https://processwire.com/modules/process-redirects/ It also allows to import the redirects as comma separated list, where each line contains one redirect. 1 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted November 12, 2021 Author Share Posted November 12, 2021 Thanks, I just installed the module an made a redirect. The URL turns out exactly the way as with the .htaccess entry. I still get this malformed redirect URL: https://mywebsite.de/modewelten/women/?it=de/women I still have no clue what is causing this ? I will check if this is a cache-related problem, though. Link to comment Share on other sites More sharing options...
Stefanowitsch Posted November 12, 2021 Author Share Posted November 12, 2021 I found the solution as it seems. In my config I had to change httpHosts configuration. From this: $config->httpHosts = array('mysite.de'); To this: $config->httpHosts = array('www.mysite.de'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now