MyBB Community Forums

Full Version: URL going to /index.php?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I just installed mybb for my new forum. Everything is great but if I am opening the forum www.siteurl.com it is OK but from inner pages the homepage link is going to www.siteurl.com/index.php

How can I change it to go to www.siteurl.com and not /index.php?

Thanks for your help.

It'll only add index.php at the end if you've got that in the URL for the link or you've got something to redirect. Don't really see why it'd matter though, it's essentially the same URL...
I understand but for SEO aspects it is not good.

For example after few months when I will have good no. of backlinks google will be giving page rank to my site and it will be like

http://www.siteurl.com/ - PR 1
http://www.siteurl.com/index.php - PR 0

Who cares PR now? Also for Google it is the same page I belive. Wink
AdminCP -> Templates & Style -> Templates -> **expand your templates set** --> Header Templates -> header.
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
Look for a line similiar to this (might be different on other themes), and remove the index.php from there.

Open up /global.php (in the root of your forum), line 506 (for version 1.4.14) or line 567 (for version 1.6) and look for:
$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";
Remove index.php, save the file and you're done.

This will completely remove all links to /index.php, so your index will now be http://siteurl.com/
Thankyou, exactly what i was looking for!
There are several references to index.php and they are probably necessary, since index.php is not necessarily the index. You could just as well set portal.php to be the index. A more generic solution would be to make a rewrite rule that redirects your index page to /.
^ Thanks for your help. I have removed that index.php successfully Smile

(2010-08-22, 01:24 PM)jani Wrote: [ -> ]^ Thanks for your help. I have removed that index.php successfully Smile

You removed index.php? :s
^ NO, I meant to say I removed /index.php from the code in the header file.

Now if I click the logo it is going to www.siteurl.com and not www.siteurl.com/index.php.