News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

remove index.php from url

Started by neon3, October 25, 2008, 12:51:06 AM

Previous topic - Next topic

neon3

is there a way to remove index.php from url and not show it there?

Nathaniel

Find this code from your '/Sources/QueryString.php' file:
$scripturl = $boardurl . '/index.php';

Replace with this code:
$scripturl = $boardurl . '/';

If you just want to make your urls look different, then you could also use the 'Search engine friendly URLs' feature in the admin panel under 'Features and Options'.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

neon3

#2
did that but now the site doesn't work. it is almost like someone changed the 'images' directory so the site appears but without all the background colors, images etc.

Nathaniel

That edit didn't change the images directory variable or any other settings like that. It worked fine for me with SMF 1.1.6.

Which version of SMF do you have?
Can you post a link to your forum?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

neon3

I am using the same version. Somehow it does mess up everything.

here is a link to the forums.

hxxp:www.automobileforum.net [nonactive]

Marcus Forsberg


neon3

Anyways I am changing it back to before. Until I find a solution for it. If you know what is causing it then post here.

Nathaniel

As Nascar said, your forum's theme works fine when you refresh your browsers cache, which can be done by clicking F5 for some browsers and Ctrl + F5 for others. ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

neon3

I would prefer it if it worked without the refreshing.

Marcus Forsberg

You'll only have to refresh one time and it will work forever.

Nathaniel

The need for refreshing is 'less than ideal', maybe you could just use the ''Search engine friendly URLs' feature instead?

There are also two mods, that can change how your urls look:
http://custom.simplemachines.org/mods/index.php?mod=986
http://custom.simplemachines.org/mods/index.php?mod=636

In fact, the first of those mods has an option to remove the 'index.php' part. ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Advertisement: