Forum Moderators: phranque

Message Too Old, No Replies

trailing slash when populating a variable

         

jacquesv

9:12 am on Nov 26, 2004 (gmt 0)

10+ Year Member



greetings all..

i'm trying to do the following:

[blah.net...] rewrites to...

[blah.net...]

my rewrite rule almost works but it adds a '/' instead of a '&' for $1... so the above URL reads...

[blah.net...] ...which breaks the URL.

my mod_rewtrite code is the following...

RewriteCond %{QUERY_STRING} voucher=([^&]+)
RewriteRule ^/retail/([^/]+)/([^/]+)/voucher.exe$ [blah.net...] [R,L]

i'm desperate to sort this issue out!

jdMorgan

4:50 pm on Nov 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jacquesv,

I don't see anything wrong with your code, except that you should escape the period in "voucher\.exe". But that should not cause this problem.

Do you have any other rewrites in httpd.conf or in .htaccess files that might modify this URL?

If not, the only thing I can think of would be to manually re-type the rule, in case some of the characters have somehow been corrupted.

Jim

jacquesv

9:34 am on Nov 29, 2004 (gmt 0)

10+ Year Member



i reordered the various rules. i stuck this one on top and now it works... really bizzare. there's obviously another rule that is screwing up this one. the wierd thing is that the other rules end with [R,L] which should not impact on this one.

anyhow, the rule works, along with the other.

kind thanks for your previous comment!