News:

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

Main Menu

Still not solved: htaccess redirect problem

Started by Neverhurry, June 02, 2010, 04:03:08 AM

Previous topic - Next topic

Neverhurry

Hi, I don't know if this is possible, I want to make a small forum, it is so small that there is only one board. So I decide, when users hit: www dot mysite dot com, it will go directly to index.php?board=1.0 instead of going to index.php?action=forum.
I will appreciate very much your advice. Thank you.
I am using SMF 2.0.1, curve themes.

Kays

Hi, don't you have another topic open on this?

Look into using a redirect in .htaccess. Google it as I'm not that comfortable with it and you should be able find how to do it quite readily.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Neverhurry

Quote from: Kays on June 05, 2010, 07:08:43 AM
Hi, don't you have another topic open on this?

Look into using a redirect in .htaccess. Google it as I'm not that comfortable with it and you should be able find how to do it quite readily.

Thank you Kays, and I am very sorry for the duplicate, that's my fault because I thought I didn't make myself understood in this topic, i could have just edit it. Please delete the other topic for me. I asked this question and waited 3 days to have first answer. It is so frustrated.
I am using SMF 2.0.1, curve themes.

Kays

Unfortunately, we've been getting behind responding to support topics and I was just going though some unanswered ones.

Do look into using .htccess for this as it's probably the best way. Otherwise the links in the menu bar can be edited but that won't redirect someone coming directly into the forum.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Neverhurry

Quote from: Kays on June 05, 2010, 07:23:28 AM
Unfortunately, we've been getting behind responding to support topics and I was just going though some unanswered ones.

Do look into using .htccess for this as it's probably the best way. Otherwise the links in the menu bar can be edited but that won't redirect someone coming directly into the forum.

Kays, thanks for inspiration, i did it.  :D :D :D
Anyone who interested how to do, pls reply to this post.
I am using SMF 2.0.1, curve themes.

Neverhurry

With the .htaccess when www yousite com opens it will go to the board url, for example www.yoursite.com/index?board=1.0, that does the trick. Here is the code for those who have interest:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yoursite.com$
RewriteRule ^/?$ "http\:\/\/www\.yoursite\.com\/index.php\?board\=1\.0" [R=301,L]




But the real challenge is, how to do when www.yoursite.com/index?board=1.0 opens the url will display only www.yoursite.com/ without the following part "index?board=1.0". That is tough, i don't anything about it, can someone give me some hints or direction, that I can pursue further. Thanks.
I am using SMF 2.0.1, curve themes.

Neverhurry

#6
Not perfect, not at all, the above code redirect only yoursite.com to yoursite.com/index.php?board=1.0 but it can not redirect yoursite.com/index.php which is default link url of "Home" button in the navigation menu (and it will redirect by default to yoursite.com/index.php?action=forum). Who knows how to solve this problem?
I am using SMF 2.0.1, curve themes.

Neverhurry

I tried this but got a loop:

Options +FollowSymLinks
RewriteEngine on
redirect /index.php http://yoursite/index.php?board=1.0

:'(
anybody can help? 
I am using SMF 2.0.1, curve themes.

Neverhurry

Can anybody tell me, is $scripturl set by default /index.php?
and when I hit $scripturl  that is index.php, then it redirects to /index.php?action=forum
Where is it defined, can I change them? thanks.

When mouse is over the Navigation Home button one can see its link url is yoursite.com/index.php, why is it? can it be changed to yoursite.com/? Is it anyway that one can change the Home button url? Or, is it anywhere inside the ACP that one can choose the forum url?

In short, because the Home button is very often used, and because its url is yoursite.com/index.php, that I don't know how to redirect it to yoursite.com/index.php?board=1.0, that i need to change its link url to yoursite.com/ without the following index.php, pls help.
I am using SMF 2.0.1, curve themes.

Neverhurry

Quote from: Neverhurry on June 05, 2010, 01:42:08 PM
With the .htaccess when www yousite com opens it will go to the board url, for example www.yoursite.com/index?board=1.0, that does the trick. Here is the code for those who have interest:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yoursite.com$
RewriteRule ^/?$ "http\:\/\/www\.yoursite\.com\/index.php\?board\=1\.0" [R=301,L]


But the real challenge is, how to do when www.yoursite.com/index?board=1.0 opens the url will display only www.yoursite.com/ without the following part "index?board=1.0". That is tough, i don't anything about it, can someone give me some hints or direction, that I can pursue further. Thanks.

Who knows?
I am using SMF 2.0.1, curve themes.

Kill Em All

Sorry for the delayed response. Do you still require assistance with this issue?


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Advertisement: