Give help. Get help.

  • # July 28, 2009 at 11:56 pm

    Does anyone know how to remove the .html or .php extensions from appearing in the URL? My example would be like (before) http://www.testing/remove.html to (after) http://www.testing/remove
    I searched Chris’s site and this forum, I could not find an answer, unless I overlooked it. I did not know if anyone out here was familiar with this or not? I researched the web, I know this requires coding in the .htaccess.txt file. However, some of the example codes I tried never worked for some reason.

    One example code:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME}!-d
    RewriteCond %{REQUEST_FILENAME}!-f
    RewriteRule ^([^.]+).php$ $1 [L]

    Two of my PHP books, do not even mention this?

    Any help would be appreciated!


    # July 29, 2009 at 7:56 am

    Just to make sure the obvious is covered here….

    You could create a directory called "remove" in your root directory and put an index.html file inside of that and you’d have /remove/ working no problem.

    # July 29, 2009 at 10:48 am

    Chris, you know I did’nt even think about creating a directory. I will try that that. Thanks for the replies everyone!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.