The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Removing .html extensions with .htaccess file

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #243759

    I am really confused by trying to set this up. I am using the below code in the .htaccess file to try and get rid of the .html extensions. I’ve tried a few other snippets with about the same results. When I upload it via ftp it creates a 500 error across my entire website. Is there anything I am missing?

    I have read I need to drop the .html from all of my links. Is there any truth to this? Do I need to modify the below snippet with my urls and do I need a snippet for each of the urls? Thanks for any help, I’ve never written php, so I do not completely understand how it works.

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html-f
    RewriteRule ^(.*)$ $1.html

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.