OT : help needed for a Apache 301 redirect using regex

jbv at souslelogo.com jbv at souslelogo.com
Sat Sep 14 09:06:40 EDT 2013


I am making progress on this :


when I use
RewriteRule ^foo.php(.*)$ http://www.mydomain.com/?foo_$1 [R=301]
http://www.mydomain.com/foo.phpName is redirected to
http://www.mydomain.com/?foo_Name
BUT
http://www.mydomain.com/foo.php?Name is redirected to
http://www.mydomain.com/?foo_

apparently the ? in the 1st url is hard to handle...

Any hint ?

jbv


> Hello,
> If there are any experts in 301 redirect using regex, please answer
> off-list.
>
> I have several urls of this kind :
> http://www.mydomain.com/foo.php?someName_someCode
>
> that I need to permanently redirect to something like :
> http://www.mydomain.com/?foo_someName_someCode
>
> There are actually thousands of urls in which someName_someCode
> is different, and I have troubles writing the regex for a 301 RewriteRule.
> So any help would be much apreciated.
>
> Thanks in advance.
> jbv
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the use-livecode mailing list