Help

Discussion in 'PHP' started by black.hat, Jul 30, 2009.

  1. #1
    Hi,

    I am using the following code for my website delete the ".php" from the pages:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php

    but the only from i have is that if i add slash "/" in the end of URL the URL will not work only more,

    for example the url is: mysite.com/bob.php
    when i use the code above to .htaccess the url will be changed to:
    mysite.com/bob

    now when i add / in the end of it, its now working mysite.com/bob/

    is there anybody here can tell me how i can do that?
     
    black.hat, Jul 30, 2009 IP