Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Removing index.php

I've been having a hard time trying to remove index.php from the forum. I've tried a few different codes.

Here's one:

Code
RewriteCond %{IS_SUBREQ} false
RewriteRule ^index.php$ http://www.example.org [R=301,L]

Anything I'm doing wrong? How do I check if mod_rewrite is enabled?
Try this code out and see if it works.
Code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]

After doing this you can go to the link it it will remove the extensions ".html" and ".php" from the url.
Why use rewrite rule? Just edit the header template and make the logo redirect to

Code
{$mybb->settings['bburl']}

Instead of

Code
{$mybb->settings['bburl']}/index.php
(Sep 25, 2016 01:37 PM)Maeko Wrote:  Why use rewrite rule? Just edit the header template and make the logo redirect to

Code
{$mybb->settings['bburl']}

Instead of

Code
{$mybb->settings['bburl']}/index.php

because he is probably wanting to change the url in the navigation box of your browser, not in the code of the forum.
(Sep 25, 2016 03:42 PM)Netflix and Weed Wrote:  because he is probably wanting to change the url in the navigation box of your browser, not in the code of the forum.

Exactly. Thank you.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Wordpress] by StarUhmJun 4, 2017 03:47 PM 1 205 Jun 4, 2017 03:47 PM
Last Post: TonyPD
by Craze*Jan 16, 2017 02:56 AM 21 492 Jan 16, 2017 02:56 AM
Last Post: Rushax
by Sta.zeJun 28, 2016 03:51 PM 19 359 Jun 28, 2016 03:51 PM
Last Post: Nerdi