MyBB Community Forums

Full Version: Remove index.php from URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
WORKS!!!! THANK YOU!!!!!
I tried this but it doesn't work on my forums. why?
me too, It doesnt work . I tried this and then ACP panel has a bug can not sign in or post comments. I look for someone to explain this easy peasy thing with clear language for newbie.

(2018-02-17, 02:30 AM).m. Wrote: [ -> ]please see this guidance & the replies there ..

Admin send me to this topic but not helpful. Everybody ask again again this problem. Nobody answer clearly or no comments of video tutorial on web.

Thank you

Okey I solved my main page problem thank you for first comment. But how is it work for the other pages?
(2011-01-08, 02:16 AM)labrocca Wrote: [ -> ]index.php is part of the breadcrumb mainly so editing global.php does the trick.

$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";

Just remove the index.php part.  Then in header template the logo might be linked with index.php so just make that ./ too. 

Overall there isn't a need for editing your htaccess.

would be nice to see the code rather than just saying "just remove the index.php part" not complaining, just saying I have tried that and it doesn't work for me.

(2010-08-28, 11:01 PM)querschlaeger Wrote: [ -> ]Hi,

this is a very simple way to remove the index.php from your URL. Please note that this only works if you are running an Apache web server and mod_rewrite is enabled!

Just add the following lines to your root .htaccess file (directly after RewriteEngine On):

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

Of course you have to replace www.example.org wit your own MyBB installation. For example:

RewriteRule ^index.php$ http://community.mybb.com [R=301,L]
(this will work on this domain)

RewriteRule ^index.php$ http://www.example.org/board/ [R=301,L]
(if you installed MyBB in a sub folder)

The trick is the IS_SUBREQ: So the redirect will not work in sub directories like /admin or /archive (the index.php have to stay there) and it will no affect POST or GET requests!
ok I'll bite.. how do you know if mod_rewrite is enabled?
Pages: 1 2 3