Page 1 of 1

express slash problem

Posted: Wed Jul 16, 2008 1:15 am
by itsmani1
I want to redirect
/buy
or
/buy/

on buy.php

Here is my expression
RewriteRule ^buy/ /buy.php

it redirects /buy/ to buy.php but it does not redirect /buy to buy.php

any idea???

thanks in advance

Re: express slash problem

Posted: Wed Jul 16, 2008 2:15 am
by prometheuzz
itsmani1 wrote:I want to redirect
/buy
or
/buy/

on buy.php

Here is my expression
RewriteRule ^buy/ /buy.php

it redirects /buy/ to buy.php but it does not redirect /buy to buy.php

any idea???

thanks in advance
Maybe make the '/' optional?

Code: Select all

RewriteRule ^buy/? /buy.php
(Untested, and I'm not familiar with Apache's Rewrite-Mod)