Forum Moderators: phranque

Message Too Old, No Replies

Apache ignoring all but the first GET Request

Can't figure out why apache won't reconize multiple GET Requests

         

plesko02

10:59 pm on Jun 18, 2007 (gmt 0)

10+ Year Member



I have the same website on two servers (using two different domain names) and I don't know what is different in the Apache configuration between the two.

I thought that it might have been handling my .htaccess file differently, but when i enter the actual file with the GET Requests attached (url.com/file.php?var=1&var=2) it doesn't work. It recognizes the first variable but not the second.

And the files and .htaccess files are identical between the two servers... I can't figure it out.

Let me know if I didn't provide enough info...

Thanks in advance

jdMorgan

1:25 am on Jun 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To be clear, does your .htaccess file contain code that examines these name/value pairs in the query string?

If not, then it is your PHP configuration you need to look at; Apache, in and of itself, doesn't use or need query strings to function -- In other words, the server software itself doesn't care about them or do anything with them -- They are just data to be passed to a resource (your script) at whatever URL they are attached to.

However, if your .htaccess code examines and acts upon the name/value pairs in the query string, then it could be a problem with your .htaccess code.

But Apache itself always ignores all query strings, so it's not likely an Apache problem.

Jim

plesko02

2:05 am on Jun 19, 2007 (gmt 0)

10+ Year Member



here is an except from my .htaccess - which works on the other server:

url would look like: domain.com/Houston_TX/

RewriteRule ^([^/]+)_([A-Z][A-Z])/?$ view_city2.php?city=$1&state=$2 [L]

I tried using view_city2.php?city=Houston&state=TX and that didn't work, either.

So you think it is a PHP configuration issue? I didn't know there was a setting for how PHP handled GET requests.

You are unbelievably helpful... I appreciate your dedication to this forum.

plesko02

2:35 am on Jun 19, 2007 (gmt 0)

10+ Year Member



nevermind... i'm an idiot. I screwed up my database when I copied it and it was the query that was the problem. I still appreciate your help, though :)

jdMorgan

3:34 am on Jun 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well here, let's speed up your rule, so you'll have gotten something out of this:

RewriteRule ^([^/_]+)_([A-Z]{2})/?$ view_city2.php?city=$1&state=$2 [L]

Jim