Removing file extensions using htaccess


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f

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




3 thoughts on “Removing file extensions using htaccess

  1. Eusebio

    Hey there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my website to rank for some targeted keywords but I’m not seeing very good results.
    If you know of any please share. Many thanks! You can read similar blog
    here: Eco wool

  2. eco bij

    Good day! Do you know if they make any plugins to assist with
    SEO? I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good results. If you know of any please share.
    Thank you! You can read similar text here: Warm blankets

  3. auto approve list

    Excellent post. Keep writing such kind of info on your page.

    Im really impressed by your blog.
    Hey there, You’ve performed an excellent job. I will definitely digg it and in my
    opinion recommend to my friends. I am sure they’ll be benefited from this web site.!

Leave a Reply

Your email address will not be published.