.htaccess hiding .php

Discussion in 'Scripts' started by kfried, Aug 31, 2011.

to remove all ads.
  1. kfried

    kfried New Member

    Messages:
    1
    Basically I want the user to type in the following:

    http://mysite.com/page/variable1/variable2

    and the server to see

    http://mysite.com/page.php/variable1/variable2

    I know there is a way to make the variables into ?var=1var=2 however I have a php script that is implementing that functionality to better control the conversion.

    any help would be appreciated.
     
    Last edited: Aug 31, 2011
  2. MarkR

    MarkR New Member

    Messages:
    105
    You could have something like:

    Code:
    #RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-/]+)$ $1.php/$2 [L]
    I haven't tested it but if that doesn't work it won't be far out.
     

Share This Page