Jump to content

How to change /file.html to /file/


Recommended Posts

Hi, i wanted to change /file.html to /file/

I had used this code in .htaccess but the style of the file get removed

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.html
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

 

Link to post
Share on other sites
1 minute ago, PlanetCloud said:

'all' ?
I've built a library called "Flame and Blade" which works like Laravel Blade Templeting system (https://laravel.com/docs/5.6/blade) and it's quite usefull actually, I just need to update 1 file and the rest gets updated automatically.
Tho some resource's may be allocated to the PHP system processing it, but it's worth it rather than copy and pasting/changing codes for each HTMl file.

Hmmm, i think you are had converted your theme to php

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...