Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hello again,

I had a lot of questions latetly, because I'm about to upload my first website using Couchcms for my client, and some stuff isn't working.

I need to set a lot of 301 redirects, cause it's a website redesign.
Some of them work, but most of them do this:

Here's an exemple of a redirect:
Code: Select all
Redirect 301 /en/become-a-speaker /en/contact-us


And here's what happens if I go on
Code: Select all
myurl.com/en/become-a-speaker

I get an error page not found and the URL changes to:
Code: Select all
myurl.com/en/contact-us/?fname=become-a-speaker


The 301 redirects partially works, since it sends the user to "en/contact-us" page correctly, but adds that weird "?fname=become-a-speaker" part to the URL, which breaks the link.

Can anyone help me with this? Thanks a lot!
Fixed with RewriteRule. Sample:
#Before:
#Redirect 301 /en/become-a-speaker /en/contact-us
#After:
RewriteRule ^en/become-a-speaker\/*?$ /en/contact-us/ [QSD,L,R=301]

For URLs with querystrings solution here:
#--Before--
#Redirect 301 /catalog/index.php?cPath=4 /boutique
#--After--
RewriteCond %{QUERY_STRING} ^cPath=4$
RewriteRule ^catalog/index\.php$ /boutique/ [QSD,L,R=301]
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
2 posts Page 1 of 1