Forum Moderators: phranque

Message Too Old, No Replies

Possible problem with mod_rewrite or apache?

         

james11

5:13 am on May 3, 2004 (gmt 0)

10+ Year Member



Hi I am having some problems with PHP and apache on my server. Whenever I try to pass query strings to a script i.e something.php?variable=123 it returns NULL. This isnt a problem with global variables or anything like that. In phpinfo() it is also returning null for query string. I have mod_rewrite installed for use with some domains (they have software that requires it). But only for those domains.
The domains I am attempting to use this OTHER script in do not use this software. For example, I have a <Virtualhost> for a domain that uses something.php and I tried doing:
RewriteEngine off

but that doesn't work. I am not sure if it has something to do with mod_rewrite or not but it is the only thing I can come up with. I can't risk turning off mod_rewrite to see if that is the problem as I am dealing with a very high volume of traffic to those domains. I think it might be the problem though. If anyone can give me any kind of solution, i.e rules or something if it is mod_rewrite to allow ANY query string to ANY script in that virtualhost that would be fine.

Thanks in advance!
Jim

jdMorgan

2:23 pm on May 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



james11,

Welcome to WebmasterWorld [webmasterworld.com]!

You may want to look at your httpd.conf and .htaccess code for mod_rewrite directives that maninpulate the query string. If the code is not written carefully, it can indeed drop an existing query string when adding or rearranging parameters. See the [QSA] flag of RewriteRule for hints about this.

Jim

gergoe

4:53 pm on May 17, 2004 (gmt 0)

10+ Year Member



You can try to enable the logging for mod_rewrite, as a sort of troubleshooting. But I think if you check out your apache configuration you'll find the problem (if it is not php related at all). Try it out by using a perl script or anything else which is not php, to see it is related to php or not.