Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Anglis on February 27, 2008, 03:37:42 PM

Title: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on February 27, 2008, 03:37:42 PM
 Hi recently i have noticed that my SMF forums urls are domain.ext and domain.ext/index.php, which means when i click on home , or when most of the traffic comes from SE it actually shows link domain.ext/index.php, how and where can i change my ''Home'' url which links to index.php , i want it to be changed to what is my domain without index.php!

cheers in advance

vai
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: jerm on February 28, 2008, 12:46:04 AM
index.template.php


// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Change the <a href> part
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on February 28, 2008, 07:05:31 AM

I have changed it to this!

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="http://mydomein.lv" , $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


still the same problem, i probably it added wrong i didnt remove smething, can you have a look plz ?

thx
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Kindred on February 28, 2008, 09:00:29 AM
I am surprised that even works at all...

<a href="http://mydomein.lv" , $scripturl, '">

should be
<a href="http://mydomein.lv">
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on March 01, 2008, 07:50:14 AM
weird i have changed it to like u said!

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="http://mydomein.lv">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
i still get a same index.php after my domain if i hit Home :/  And that is the file index.template.php in themes/default folder , i guess it cant be  themes i am using atm file, since there wont be such a files in it like '' // Show the [home] button.''
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: greyknight17 on March 01, 2008, 04:21:45 PM
What theme are you using?
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Kindred on March 02, 2008, 03:44:26 AM
ummm... yes, you will most definitely have to change the code in the theme(s) you are using.
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on March 02, 2008, 05:11:41 PM
Quote from: greyknight17 on March 01, 2008, 04:21:45 PM
What theme are you using?
blueskies_11  theme
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: greyknight17 on March 02, 2008, 05:57:21 PM
Open up /Themes/blueskies.../index.template.php:

Code (Search for) Select
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

Code (Replace with) Select
<li><a href="http://mydomein.lv">YOUR TEXT HERE</a></li>
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';


Replace the domain and YOUR TEXT HERE according to what you want.
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on March 03, 2008, 04:35:11 AM
Quote from: greyknight17 on March 02, 2008, 05:57:21 PM
Open up /Themes/blueskies.../index.template.php:

Code (Search for) Select
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

Code (Replace with) Select
<li><a href="http://mydomein.lv">YOUR TEXT HERE</a></li>
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';


Replace the domain and YOUR TEXT HERE according to what you want.
ok cheers, thanks very much!
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on March 03, 2008, 08:08:00 PM
Sorry but i have tried it and it doesnt work :( , besides it gives me a new gap between MENUS at top! And still got the index.php when i click HOME!
besides why would i possibly need there a place for ''Your TEXT in there'' ?

EDITED:

You mixed up lines i think! I meant Home link! Can you tell me please with what i have to replace this line ?

<li><a' , $current_action=='home' ? ' class="chosen"' : '' , ' href="', $scripturl, '">' , $txt[103] , '</a></li>'; i tired myself, but got an error :/

cheers
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: greyknight17 on March 03, 2008, 09:56:18 PM
Do you just want that to point to your own link? If so, change it to the following:

<li><a href="http://www.yoursite.com">' , $txt[103] , '</a></li>';

Replace yoursite.com with the site you want to use.
Title: Re: domain.ext and domain.ext/index.php issue? How to change it?
Post by: Anglis on March 04, 2008, 07:32:39 PM
not sure what exactly u meant by this!

QuoteDo you just want that to point to your own link? If so, change it to the following:

but yeah thanks it works now :)