News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Please how do i remove index.php from my SMF title?

Started by opeedo, October 22, 2013, 07:45:41 PM

Previous topic - Next topic

opeedo

i am a dummy user Please how do i remove index.php  from my SMF title? please i do not need mod  .
i need code answer

Arantor

Well, a mod IS a code answer... a mod is literally just extra code added to your site.

However, I strongly recommend against it. There are some interesting side effects to doing it like breaking your forum for all new visitors.

BillLeeDee

Since the title only says index after the forum title I'm assuming you're talking about removing index.php from the address bar when somebody goes to the main forum page, is this correct? If that's what you're speaking about and your site is using index.php pages elsewhere and your forum is one directory level down from the root url on your server you can put the following code in your htaccess files


Options -Indexes
Options +FollowSymlinks
RewriteEngine on

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ http://www.your-domain.xyz/$1 [R=301,L]
# replace URL in the rewrite rule with your fully qualified domain url


This will also make it some any index.php for any directory will show the directory name and not index.php. I've been using this and it works well. If you simply meant removing the dash and index from the forum title I just used one of the few mods that do it.

Arantor

No, I think he wants it gone everywhere - fixing it as a redirect is fine but it doesn't stop SMF emitting index.php in all the URLs - and changing that has lots of nasty consequences.

If it's just done on its own, it WILL break things. If it's done as part of the Pretty URLs mod it will work - but that has been known to break other things.

opeedo

Thanks for your reply i need to remove it everywhere, i want to customize my site links like this site ( http://nairaland.com [nofollow] ) please check it out

Arantor

You mean that site that's ugly as sin and isn't running SMF software any more (and hasn't been for at least a year)?

Copying Nairaland won't miraculously make you popular, you know.

mashby

Your topic title indicates "SMF title" not your URL. Or are you really meaning the URL? I'm guessing the latter as is everyone else in this topic. What is the reason why you want index.php gone?
Always be a little kinder than necessary.
- James M. Barrie

Colin

I just can't put my finger on the sheer number of people that want to mimic that site. In my opinion it looks god awful.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Kindred

that site is indeed terrible... and the user can't make up his mind what he actually wants.

First he wants to look like that site, then he wants some post with image, like some other site....    why not be original?  Make your own layout....


And as for removing index.php from the url... DON'T.   Unless yu know EXACTLY hat you are doing, it is a stupid, stupid move...  (and, honestly, even if you do know what you are oding, it's rather stupid)

Why don't you answer the question as to why you think it would be a good idea to remove index.php from the url? 
Do you think it will improve your site ranking in the search engines (hint: it won't)
Do you think it will improve your visitors' experiences? (hint: it won't 99.9% of the users never even look at the url anyway and if they do' it's just to copyt/paste it somewhere)
Do you have some specific reason that you think you need to remove the index.php from your forum's url?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: