CodeIgniter Forums
Referrer query string issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Referrer query string issue (/showthread.php?tid=21946)



Referrer query string issue - El Forum - 08-25-2009

[eluser]George Ornbo[/eluser]
A client is using dotMailer to send out emails and is linking back to the site.

The URLs that are generated by dotMailer are like this

http://site.com/?dm_t=0,0,0,0,0

The parameter "dm_t" is always the same but the number sequence changes.

This generates a 404 from CodeIgniter.

Does anyone have any advice on the cleanest way to handle these referrals so that CodeIgniter doesn't generate a 404?

My uri_protocol is set to:

Code:
$config['uri_protocol']    = "AUTO";

I've also removed index.php using

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Thanks in advance!


Referrer query string issue - El Forum - 08-25-2009

[eluser]George Ornbo[/eluser]
Fixed it.

Add this to your .htaccess file:

Code:
RewriteCond %{QUERY_STRING} .
RewriteRule ^(.*)$ http://site.com/$1? [L]
:red: