2014-07-19, 01:20 PM
2014-07-19, 02:32 PM
You would have to update functions.php
2014-07-20, 12:23 AM
You legend!! Thanks pal! So all I need to do is change {$base_url}thread-{$id}.html to {$base_url}thread/{$id} ?
2014-07-20, 01:22 AM
Yes, you'll also need to update your .htaccess file to match the correct rules.
However, MyBB uses relative URLs everywhere, so running virtual directories will cause a lot of things (avatars, some links, possibly stylesheets/js) so it is generally not recommended to do and will likely take a lot of work to get functioning.
However, MyBB uses relative URLs everywhere, so running virtual directories will cause a lot of things (avatars, some links, possibly stylesheets/js) so it is generally not recommended to do and will likely take a lot of work to get functioning.
2014-07-20, 03:30 AM
With .htaccess under apache you can do the redirect like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
As for removing of .html from the url, simply link to the page without .html
<a href="http://www.example.com/page">page</a>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
As for removing of .html from the url, simply link to the page without .html
<a href="http://www.example.com/page">page</a>