Re: moving from mod_php to mod_fcgid : rewrite problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Riccardo Cohen schrieb:
On 07/02/13 16:50, Yehuda Katz wrote:
On Tue, Feb 5, 2013 at 3:32 PM, Riccardo Cohen
<r.cohen@xxxxxxxxxxxxxxxxxxx <mailto:r.cohen@xxxxxxxxxxxxxxxxxxx>> wrote:

Example : the catalog is at url :
http://www.perspectives-__musicales.org/en/all-albums
<http://www.perspectives-musicales.org/en/all-albums>
This should be transparantly mapped to
http://www.perspectives-__musicales.org/index.php/en/__all-albums
<http://www.perspectives-musicales.org/index.php/en/all-albums>
thanks to the rewrite rule :

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

My application uses then $_SERVER["PATH_INFO"] (and not
$_SERVER["QUERY_STRING"]) to retreive url information. This worked
perfectly until last month, because web4all.fr <http://web4all.fr>
changed the whole system and separated apache from php, using fast
cgi instead of mod_php.

-------------

RewriteRule ^test2/(.*) ./test.php?$1
- test2 : the rewrite rule works, but of course the url information
is no more in path_info, it is in query_string as shown in the page
content

My host tried several searches on forums including this one, and
could not find any answer. It seems to be an apache bug, but not
sure, I have no bug number to give anyway. If it is a bug, it is
demontrated by test1 I think.

Probably not an HTTPD bug. More likely a problem with the PHP fcgi
configuration.

I know I can change my code to use query_string everywhere instead
of path_info, but if I can avoid changing and testing all my
websites it would be really great

This is the most reliable option. I use something like this:
RewriteRule ^en/(.*) ./index.php?page=en/$1


- Y


> Thanks for your answer Yehuda
>
> Your rewrite rule will behave like my test2/3, converting pathinfo to a
> querystring... and force me to change and double check all my website !
>
> Thanks anyway.
>

You have to check your php code anyway, since the content of $_SERVER in case of mod_php differs from the content of $_SERVER in case of mod_fcgid.

  Hendrik


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux