Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: Thantos in November 27, 2005, 11:17:01 NACHMITTAGS

Titel: Rename index.php
Beitrag von: Thantos in November 27, 2005, 11:17:01 NACHMITTAGS
To rename the forum's index.php file do the following:

Rename the actual file.
Open QueryString.php in your Sources directory
Find $scripturl = $boardurl . '/index.php';
And change index.php to whatever filename you want.
Titel: Re: Rename index.php
Beitrag von: Leipe Po in November 28, 2005, 01:21:07 NACHMITTAGS
wahaahaha i really needed this, and withing 3 mouse clicks found it, good job and thank a bunch
Titel: Re: Rename index.php
Beitrag von: Neol in Juni 27, 2007, 07:53:37 NACHMITTAGS
What is the point of this?
Titel: Re: Rename index.php
Beitrag von: Flying Drupalist in Juni 28, 2007, 12:13:28 NACHMITTAGS
You can build other front pages! OMG THANKS!
Titel: Re: Rename index.php
Beitrag von: babjusi in Juni 28, 2007, 12:36:22 NACHMITTAGS
Thanks for this tip Thantos
Titel: Re: Rename index.php
Beitrag von: Flying Drupalist in Juni 29, 2007, 08:45:06 NACHMITTAGS
Really happy that Zeri YT bumped this. :D
Titel: Re: Rename index.php
Beitrag von: jkay in Juli 06, 2007, 05:00:04 VORMITTAG
How do I create a index page that is of the same template as my forum?

Thanks!
Titel: Re: Rename index.php
Beitrag von: Osmonicar in Juli 06, 2007, 06:19:28 VORMITTAG
Zitat von: jkay in Juli 06, 2007, 05:00:04 VORMITTAG
How do I create a index page that is of the same template as my forum?

Thanks!

Just copy the index.php I think?
Titel: Re: Rename index.php
Beitrag von: Harro in Juli 06, 2007, 06:48:00 VORMITTAG
You'll have to create it.
Take a look at this topic (http://www.simplemachines.org/community/index.php?topic=163770.0) for a bit more information.
Titel: Re: Rename index.php
Beitrag von: jkay in Juli 08, 2007, 03:59:32 NACHMITTAGS
Thanks! I have successfully changed that. I need help with editing the link tree, any idea how I can do that?

http://www.simplemachines.org/community/index.php?topic=181497.msg1154676#msg1154676 (http://www.simplemachines.org/community/index.php?topic=181497.msg1154676#msg1154676)
Titel: Re: Rename index.php
Beitrag von: Harro in Juli 28, 2007, 12:03:52 NACHMITTAGS
Just replied in that topic. Let me know there if you still need help with it :)
Titel: Re: Rename index.php
Beitrag von: heavyccasey in August 01, 2007, 11:58:23 NACHMITTAGS
This was posted in 2005. Does it still work?
Titel: Re: Rename index.php
Beitrag von: Dragooon in August 02, 2007, 12:19:38 VORMITTAG
Yes it does work.
Titel: Re: Rename index.php
Beitrag von: whosline07 in Mai 13, 2009, 12:03:48 VORMITTAG
Quick problem with this, I changed the line to use forums.php instead of index.php, and it did in fact change the url's for the link bar to the correct ones, however none of them work.  Any suggestions?
Titel: Re: Rename index.php
Beitrag von: JBlaze in Mai 13, 2009, 12:12:13 VORMITTAG
You have to rename index.php as well...
Titel: Re: Rename index.php
Beitrag von: whosline07 in Mai 13, 2009, 12:14:39 VORMITTAG
Sorry to not mention that, but I did that as well.
Titel: Re: Rename index.php
Beitrag von: JBlaze in Mai 13, 2009, 12:16:53 VORMITTAG
What version forum are you using? If you are using 2.0 you may have to clear your forum cache.
Titel: Re: Rename index.php
Beitrag von: whosline07 in Mai 13, 2009, 12:18:41 VORMITTAG
That appears to have solved it thanks a bunch.
Titel: Re: Rename index.php
Beitrag von: JBlaze in Mai 13, 2009, 12:19:48 VORMITTAG
No problem :)
Titel: Re: Rename index.php
Beitrag von: MF30 in August 25, 2009, 04:58:09 NACHMITTAGS
Thanks for the tip. :)
Titel: Re: Rename index.php
Beitrag von: ultide in September 01, 2009, 06:37:17 VORMITTAG
thanks a lot .... i needed this :D
Titel: Re: Rename index.php
Beitrag von: devinlefevere in September 19, 2009, 07:42:26 NACHMITTAGS
Which index file do I need to modify? the one in sources or the main folder?

also can Caps be used?
Titel: Re: Rename index.php
Beitrag von: Arantor in September 20, 2009, 09:49:38 VORMITTAG
You need to modify the very topic index.php.

Caps can be used only if you make sure the definition of $scripturl is updated too; some servers dislike caps, so be careful.

In general this whole process isn't really recommended; putting it in a folder would be far more preferable generally.
Titel: Re: Rename index.php
Beitrag von: devinlefevere in September 20, 2009, 08:44:16 NACHMITTAGS
Zitat von: Arantor in September 20, 2009, 09:49:38 VORMITTAG
You need to modify the very topic index.php.

Caps can be used only if you make sure the definition of $scripturl is updated too; some servers dislike caps, so be careful.

In general this whole process isn't really recommended; putting it in a folder would be far more preferable generally.

Gotcha. Well thanks for the help. I might go the folder route then in that case.
Titel: Re: Rename index.php
Beitrag von: Arantor in September 20, 2009, 09:01:15 NACHMITTAGS
Can I ask what the need for not putting it in a folder was?
Titel: Re: Rename index.php
Beitrag von: darrenbeige in September 24, 2009, 01:52:47 NACHMITTAGS
If you have done this to your forum, if you install any more mods through the package manager, it will report it as going to fail. This is not the case. Carry on with the package installation, and manually add any code to your new index.php (whatever it may be called).

Thanks,
Titel: Re: Rename index.php
Beitrag von: Arantor in September 24, 2009, 02:37:54 NACHMITTAGS
Only if the mod alters index.php - not all of them do.

It's still not really recommended to do this anyway.
Titel: Re: Rename index.php
Beitrag von: darrenbeige in September 24, 2009, 02:59:46 NACHMITTAGS
A lot of them do though; mainly to add to the actions array...
Titel: Re: Rename index.php
Beitrag von: Arantor in September 24, 2009, 03:12:52 NACHMITTAGS
Speaking as a mod author; only 1 of the mods I've written actually targets index.php - while mods can and do add actions, fewer do so than you might think.
Titel: Re: Rename index.php
Beitrag von: darrenbeige in September 25, 2009, 02:49:54 NACHMITTAGS
I suppose it depends what mods you add. Most of mine seemed to add to the actions array. Anyhow, regardless of how common or uncommon the event may be, it is still possible that you may need to perform the index.php edits manually.
Titel: Re: Rename index.php
Beitrag von: Arantor in September 25, 2009, 02:57:21 NACHMITTAGS
Oh, of course. And in those cases, yes, you will have to perform those on whatever you rename index.php to, since the mod will HAVE to be manual-installed at least for that step.
Titel: Rename index.php
Beitrag von: MDMeyers in April 05, 2010, 08:41:34 VORMITTAG
Recently installed SMF and allowed program to default setting on install. 
Now, I see URL is non descrilptive.  Read thread about rename index.php and wanted to know that would address this issue with URL?
Thanks
Titel: Re: Rename index.php
Beitrag von: Arantor in April 05, 2010, 08:55:20 VORMITTAG
Install Pretty Urls or SimpleSEF mod. However in a forum, descriptive URLs do NOT have an SEO benefit AT ALL.
Titel: Re: Rename index.php
Beitrag von: BadBiz in Mai 01, 2011, 03:56:11 NACHMITTAGS
Zitat von: Thantos in November 27, 2005, 11:17:01 NACHMITTAGS
To rename the forum's index.php file do the following:

Rename the actual file.
Open QueryString.php in your Sources directory
Find $scripturl = $boardurl . '/index.php';
And change index.php to whatever filename you want.
Hi there, thank you for the information but in my case this did not work this is what I did,

Edited;
QueryString.php

Which said;
$scripturl = $boardurl . '/index.php';

Renamed;
mydomain/index.php to mydomain.home.php

Saved All;

Forum Crashed any suggestions it went back fine when I renamed the home.php and reversed everything

Any suggestions would be appreciated
Titel: Re: Rename index.php
Beitrag von: kat in Mai 01, 2011, 04:27:35 NACHMITTAGS
Zitat von: BadBiz in Mai 01, 2011, 03:56:11 NACHMITTAGS
$scripturl = $boardurl . '/index.php';

Renamed;
mydomain/index.php to mydomain.home.php

Is that a typo?

I believe it should be:

mydomain/index.php to mydomain/home.php

Subtly different, yes?
Titel: Re: Rename index.php
Beitrag von: Frona in Januar 29, 2012, 06:39:55 VORMITTAG
Zitat von: Thantos in November 27, 2005, 11:17:01 NACHMITTAGS
To rename the forum's index.php file do the following:

Rename the actual file.
Open QueryString.php in your Sources directory
Find $scripturl = $boardurl . '/index.php';
And change index.php to whatever filename you want.
I do that, but it dosen't wotk :(

I follow this way:
1. renaming index.php to abc.php
2. changing $boardurl . '/index.php'; line of QueryString.php file to $boardurl . '/abc.php'
3. moving files and folders to root of host, then trying to install SMF using:
www.***.com/install.php

But I get this error:
Zitat!! Critical Error!
Unable to find crucial installation files in the directory of this script!
Please make sure you uploaded the entire installation package, including the sql file, and then try again.
See here (http://up.vatandownload.com/images/50bfam44s1xeclbizz4.png), plz.
Titel: Renaming index.php
Beitrag von: Frona in Januar 29, 2012, 04:06:36 NACHMITTAGS
searching After days, I found this topic and above trick, but it doesn't work on SMF2.0.x!
Titel: Re: Rename index.php
Beitrag von: Frona in Januar 30, 2012, 09:18:45 VORMITTAG
please help! that's important for me to:
1. Rename index.php
2. hide the index of SMF => Users should not access to front page(index), I'll give them links of subforums!
Titel: Re: Rename index.php
Beitrag von: Frona in Februar 03, 2012, 03:58:36 VORMITTAG
Up :(
Titel: Re: Rename index.php
Beitrag von: tmlander in Februar 19, 2012, 06:30:08 VORMITTAG
 :(

This doesn't seem to work for me... I'm running version 2.0.2

I changed the $scripturl located in Sources/QueryString.php to my file name...
I changed the actual file name...
I cleared the cache by going to Forum Maintenance >> Empty the file cache

What am I doing wrong?

Any help would be appreciated!!!
Titel: Re: Rename index.php
Beitrag von: Theatre Publicity in November 28, 2012, 02:33:28 NACHMITTAGS
Zitat von: Arantor in April 05, 2010, 08:55:20 VORMITTAG
Install Pretty Urls or SimpleSEF mod. However in a forum, descriptive URLs do NOT have an SEO benefit AT ALL.

Agreeing with Arantor on this one - though I would add it doesn't take a whole lot of effort to install the pretty urls mod package and configure it - and people do prefer clicking on urls that are more descriptive.

Where I do think you can get a little more bang for your buck is in altering the title text code in your forum. It does not take a lot of skill to swap the order of texts making the forum title more descriptive to search engines.
Titel: Re: Rename index.php
Beitrag von: winsoft in November 28, 2012, 04:19:31 NACHMITTAGS
great tip, i will try to do that, it's good change that file name for security concerns.
Titel: Re: Rename index.php
Beitrag von: Silvershark78 in Dezember 07, 2012, 07:25:39 NACHMITTAGS
OK. Quick question. If I rename index.php, will I have to alter the link on my homepage to the forum? Will it mess with simple portal? The only reason I want to rename the utl is because I have been told by 3 marketing web designers that the url looks unproffesional. But I read the mod that renames it in the modification section and it says you have to disable the make it seo friendly option. Which would be detrimental. correct?
I just want to take it out of the main portal url to make the url look a little better, I don't mind if index appears on any other page in the forum.

Is it worth bothering with this? Is it detrimental to search engines? will it cause problems other than package manager?
Titel: Re: Rename index.php
Beitrag von: mashby in Dezember 07, 2012, 07:32:53 NACHMITTAGS
I'm going to sum it up like this. You have 3 marketing web designers who think index.php looks unprofessional?!? Huh? Sure, I wish it read beermenow.php, but isn't the content on the page a lot more important? You're simply worrying about something that is really trivial. I wouldn't mess with it at all.