Re: moving from mod_php to mod_fcgid : rewrite problem

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

 



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.

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

--
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
1 rue de la Monnaie
37000 Tours
France

<http://www.appartement-maison.fr>

---------------------------------------------------------------------
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