2

Got a site that want to use tracking in URLS like http://domain.com/segment_1/segment_2/?utm_campaign=google

Now this works fine locally but on the production server, it renders the 404.

On MAMP I've set the config['uri_protocol'] = 'PATH_INFO' and have tried this in production but still get the problem.

Any suggestions?

2
RewriteRule ^(.*)$ /index.php?/$1

Instead of...

RewriteRule ^(.*)$ /index.php/$1

Normally the first thing I try when query strings go wrong!

| improve this answer | |
  • seems I jumped the gun a little bit here. Although it fixed the query string problem, it introduced a bug where a single entry view wasn't displaying the right content. For example pilot.no/aktiviteter/detaljer/opptaksprver-stavanger-03.10 would wrongly show location as Stockholm – Steven Grant Oct 3 '13 at 9:57
  • Why/how would the htaccess rewrites impact on the geographical location? It shows Stavanger for me...? – Peter Lewis Oct 3 '13 at 13:13
  • yeah, had to revert it back for the client so in production it's fine. Here's the staging link d.pr/f8ob - click on Stavanger and you'll see – Steven Grant Oct 3 '13 at 14:56
  • Sorry, thought I'd commented on this already. Hamar works fine, so I'm not sure this is an htaccess issue - why would it work fine for one and not the others. You'll need to explain how your getting the location, currently in the source I see "stockholm" being sent to Google Maps, so there has to be an issue in your template code, as the displayed data shows the correct location...? – Peter Lewis Oct 4 '13 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.