Need help regarding mod rewrite please help

by 3 replies
4
Need help regarding mod rewrite please help. What I want is

mydomainname/index.php?id=9

convert to

mydomainname/index.php/9.html

can anyone tell me how to do it?
#programming #mod #rewrite
  • hope this helps you out some. we have this rule in out site.

    RewriteRule ^go/(.*) aff.php?id=$1

    domain.com/go/4
    goes to
    domain.com/aff.php?id=4

    i know its not exactly what you need but hopefully it is close enough you can change it to work for you.

    not sure if im right but it would look like this if i am.

    RewriteRule ^index.php/(.*).html index.php?id=$1

    give it a try and let me know
  • are you using wordpress?
  • Something similar can be accomplished using the

    AcceptPath Directive

    if your host supports it (most do) if not, mod_rewrite is the way to go

Next Topics on Trending Feed