CodeIgniter Forums
allow ?ppid=(xxx) in url. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: allow ?ppid=(xxx) in url. (/showthread.php?tid=13178)



allow ?ppid=(xxx) in url. - El Forum - 11-13-2008

[eluser]BeingDefined[/eluser]
I know I know, there has been so many topics on this but hear me out ...

I have my site redirect off to a third party site and after they finished with their processing, they redirect back to my site. The problem is that they add ?ppid=(random numbers) at the end of the url. So http://site.com/videos/video-title becomes http://site.com/videos/video-title?pidd=34324342342, which causes CI to throw a 404 error. I tried talking to them to redirect me the /this/type/of/url but they can't people other people depend on it. I know there was the "PATH_INFO" fix but that doesn't seem to work in 1.6 and I don't see anything new about that in the changelog of 1.7. I did search the forums and the only threads that came close to my issue were from 2006 and 2007. If i missed a thread, please link me to it Smile

Please note that there is routes involved.

Thanks


allow ?ppid=(xxx) in url. - El Forum - 11-13-2008

[eluser]davidbehler[/eluser]
I don't know much about htaccess, but ain't that something you could use?
Just cut the url at the first appearance of "?" and redirect to the first part.


allow ?ppid=(xxx) in url. - El Forum - 11-13-2008

[eluser]BeingDefined[/eluser]
actually thats what I been using for now but I'm looking for a better solution because sometimes it gets stuck in a loop. What I have in my htaccess:

RewriteCond %{QUERY_STRING} ^(.*)?pidd=(.*)\&pidd;=(.*)$
RewriteRule index.php /%1/?
RewriteCond %{QUERY_STRING} ^(.*)?pidd=(.*?)$
RewriteRule index.php /%1/?

The reason why I have pidd twice is because sometimes it gets stuck in a loops so I have that to handle up to 2 level.


allow ?ppid=(xxx) in url. - El Forum - 11-13-2008

[eluser]BeingDefined[/eluser]
false alarm! “PATH_INFO” did the trick. I was viewing the site on live server but developing it for the development server, forgot to start apache lol


allow ?ppid=(xxx) in url. - El Forum - 11-13-2008

[eluser]davidbehler[/eluser]
Haha..well glad I "helped"! Big Grin

@Mix up of dev and live server: happens to the best! Wink