AA22Dev Posted April 28, 2018 Share Posted April 28, 2018 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] Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 2 hours ago, PlanetCloud said: Add a rewrite base rule in between your <head> tags and your problem will be solved. Ok, thanks i will try Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 2 hours ago, PlanetCloud said: Add a rewrite base rule in between your <head> tags and your problem will be solved. I had added <base href="./"> in <head> but still all style lost. Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 1 minute ago, PlanetCloud said: The correct code is : <base href="/" /> Thanks it works Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 Once again thanks. Now, i had updated my all files Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted April 29, 2018 Author Share Posted April 29, 2018 2 minutes ago, PlanetCloud said: Yes it is PHP. Ok It's easy to modify the header of php files but i am using html template and whmcs Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.