1

Possible Duplicate:
.htaccess RewriteRule for Flat Links

i have a problem in a rewrite rule

i want a url like this

www.mysite.com/category/funny

how my actual looks like is this

www.mysite.com/category.php?cate=funny

What will be the rewrite rule for that?

2
  • i tried something like this but didnt work RewriteRule ^([A-Za-z0-9-]+)/category/?$ category.php?cate=$1
    – Badal
    Nov 20, 2011 at 6:11
  • 1
    Have you also tried the search? Because questions like this come up weekly.
    – mario
    Nov 20, 2011 at 6:13

1 Answer 1

5

That should do it:

RewriteEngine on
RewriteRule ^category/([^/\.]+)/?$ category.php?cate=$1 [L]
2
  • You may accept the answer and vote it up if you wish ;P
    – dimme
    Nov 20, 2011 at 6:16
  • yup i cant vote up i have only 13 reputation but i accepted the ans.
    – Badal
    Nov 20, 2011 at 6:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.