Re: mod_rewrite?

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

 





On 09/19/2011 10:33 AM, topinambour #### wrote:
Other try:
RewriteCond %{QUERY_STRING} ^\?lang=fr$
RewriteRule ^[^\.]$/%1         ^[^\.]$             [L,R=302]

then it continue with in inside network
200 answer:-( in server
and it continue with ?lang=fr in url browser zone
without http://monsite.org/-Description-
<http://monsite.org/-Description-?lang=fr> automatic redirect

So one thing
there's no500 error


2011/9/19 Frank Gingras <francois.gingras@xxxxxxxxx
<mailto:francois.gingras@xxxxxxxxx>>

    On 19/09/2011 8:59 AM, J-H Johansen wrote:

        On Mon, Sep 19, 2011 at 2:51 PM, topinambour
        ####<otpinambour@xxxxxxxxx <mailto:otpinambour@xxxxxxxxx>>__wrote:

            Hi

            I have some problems about
            to write rewriterule in .htaccess
            I use spip and URL_propre

            URL read by google as :
            #URL_site/#URL_ARTICLE?page=fr
            i would want to use to remove:?lang=fr and do :
            /#URL_SITE/#URL_ARTICLE

            Summary, it would be :
            http://monsite.org/-__Description-?lang=fr
            <http://monsite.org/-Description-?lang=fr>
            to redirect to
            http://monsite.org/-__Description-
            <http://monsite.org/-Description->

            I write :
            RewriteRule  ^\?lang=fr$    ^[^\.]$ [L,R=302]
            nothing do

            any ideas please

        Something like this maybe?

        RewriteRule  ^(.*)\?lang=fr$ $1 [L,R=302]



    You can't match the query string with RewriteRule. Instead, use a
    RewriteCond with %{QUERY_STRING}

    Frank.

    ------------------------------__------------------------------__---------
    The official User-To-User support forum of the Apache HTTP Server
    Project.
    See <URL:http://httpd.apache.org/__userslist.html
    <http://httpd.apache.org/userslist.html>> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.__apache.org
    <mailto:users-unsubscribe@xxxxxxxxxxxxxxxx>
    "   from the digest: users-digest-unsubscribe@__httpd.apache.org
    <mailto:users-digest-unsubscribe@xxxxxxxxxxxxxxxx>
    For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
    <mailto:users-help@xxxxxxxxxxxxxxxx>



Remove \?. You can't match the question mark, in any context.

Frank.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-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