Smokovsky Posted January 12, 2021 Share Posted January 12, 2021 (edited) Hey! I'm having a hard time with urls in my prestashop. I have installed multishop, prettyUrls and now I'm facing a big problem. When clicked Google Ad or Facebook link with my website it comes with mydomain.com/index.php?controller=404. I found that Facebook and Google are adding parameters to links, like mydomain.com/?fbclid=123, /?gclid=123. I worked around this problem with .htaccess: RewriteBase / RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)fbclid=(?:[^&]*)((?:&|$).*)$ [NC] RewriteCond %1%2 (^|&)([^&].*|$) RewriteRule ^(.*) /$1?%2 [R=301,L] RewriteBase / RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)gclid=(?:[^&]*)((?:&|$).*)$ [NC] RewriteCond %1%2 (^|&)([^&].*|$) RewriteRule ^(.*) /$1?%2 [R=301,L] And it is not only those two parameters, any parameter with question mark would lead to 404, like: mydomain.com/?anything Anyways now Google is crying that my gclid parameter was modified or deleted. So how to do it right? Edited January 12, 2021 by Smokovsky added tags (see edit history) Link to comment Share on other sites More sharing options...
Prestachamps Posted January 12, 2021 Share Posted January 12, 2021 Hi, I recommend that you contact the prettyURLs module developer and ask him to check and fix this issue for you as I strongly believe that the prettyURLs module is redirecting the URL's with parameters to the404 page. Kind regards, Leo Link to comment Share on other sites More sharing options...
tomasz_be Posted June 8, 2021 Share Posted June 8, 2021 Hi Smokovsky, I'm facing the same issue. Did you find a solution to fix this ? Thanks, Link to comment Share on other sites More sharing options...
ComGrafPL Posted June 8, 2021 Share Posted June 8, 2021 5 minutes ago, tomasz_be said: Hi Smokovsky, I'm facing the same issue. Did you find a solution to fix this ? Thanks, Best way is to contact devs: Link to comment Share on other sites More sharing options...
tomasz_be Posted June 11, 2021 Share Posted June 11, 2021 On 6/8/2021 at 5:57 PM, ComGrafPL said: Best way is to contact devs: Hello, This is what I did, but as I still haven't received a reply from the developer I thought that Smokovsky might have the solution. Link to comment Share on other sites More sharing options...
ComGrafPL Posted June 11, 2021 Share Posted June 11, 2021 16 minutes ago, tomasz_be said: Hello, This is what I did, but as I still haven't received a reply from the developer I thought that Smokovsky might have the solution. I can send you a module I'm using on my clients to test it out. Working great. Send me private. Link to comment Share on other sites More sharing options...
Carbone Posted September 17, 2021 Share Posted September 17, 2021 Hi all, what is the best solution here ? i am also getting 404 error. Also got pretty URLs. Link to comment Share on other sites More sharing options...
Bridge Posted April 4, 2022 Share Posted April 4, 2022 On 6/11/2021 at 3:39 AM, ComGrafPL said: I can send you a module I'm using on my clients to test it out. Working great. Send me private. Can you share this with me please? Link to comment Share on other sites More sharing options...
HaCos Posted June 9, 2022 Share Posted June 9, 2022 Hello, Did you have any update on this? Link to comment Share on other sites More sharing options...
Nickz Posted June 9, 2022 Share Posted June 9, 2022 25 minutes ago, HaCos said: Did you have any update on this? what is your problem? Many people forget about a trailing slash which could be the culprit of the 404. Link to comment Share on other sites More sharing options...
HaCos Posted June 22, 2022 Share Posted June 22, 2022 On 6/9/2022 at 4:44 PM, Nickz said: what is your problem? Many people forget about a trailing slash which could be the culprit of the 404. Ads pointing to homepage start returning error 404 with no reason. Link to comment Share on other sites More sharing options...
Nickz Posted June 22, 2022 Share Posted June 22, 2022 7 hours ago, HaCos said: Ads pointing to homepage start returning error 404 with no reason. Any php version change lately? I suggest to compare the Ads link to the actual link of the landing page. Link to comment Share on other sites More sharing options...
HaCos Posted June 23, 2022 Share Posted June 23, 2022 No errors on server logs, nothing to do with php version. The problem was with the gclid param google sets to track the ads campaigns performance. I updated my htaccess to remove this in order to bypass 404 errors on homepage. 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