htaccess rewrite query

Associate
Joined
18 May 2006
Posts
785
I've posted the query on stackoverflow if you'd prefer to reply there:

http://stackoverflow.com/questions/11559333/htaccess-mod-rewrite-with-no-suffix

or


I'm trying to get the following Mod Rewrite to work with no trailing slash as a suffix or file name.

RewriteEngine On
RewriteRule ^test/([^/]*)/([^/]*)/$ /example1/example2/index.php?brand=

$1&video=$2 [L]
The above works however if I remove the trailing slash from /$ it wont work.

So just to recap:

www.example.co.uk/example/example2/index.php?brand=x&video=y

rewrites to

www.example.co.uk/test/brand/video/

but I can't get it working for

www.example.co.uk/test/brand/video
 
Hi mate, I am keeping the $ yep just removing the slash - it doesn't seem to like no suffix at the end tho. Can I ask why you think the trailing slash is worth keeping?
 
Back
Top Bottom