Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: nathan89 - helmikuu 01, 2009, 06:43:35 IP

Otsikko: Placing Forum in Folder
Kirjoitti: nathan89 - helmikuu 01, 2009, 06:43:35 IP
I would like to place my forum in a folder called (community) which works fine, however when some access the root of my site of course no page is displayed.  Without doing a redirect how could I get simple portal do display at my sites root.

Forum is located (http://crohnssociety.com/community)

Would like simple portal to display at (http://crohnssociety.com/index.php)
Otsikko: Re: Placing Forum in Folder
Kirjoitti: Galaxy Computers - helmikuu 01, 2009, 06:50:18 IP
When you use your FTP client create a sub folder called community then upload your forum files within that folder.
Otsikko: Re: Placing Forum in Folder
Kirjoitti: nathan89 - helmikuu 01, 2009, 07:02:00 IP
I understand that in fact I have already done it, I just want my simple portal to display at the root.
Otsikko: Re: Placing Forum in Folder
Kirjoitti: aldo - helmikuu 01, 2009, 07:18:59 IP
SimplePortal is part of your SMF forum, so you would need your whole SMF installation to be in your root directory, as you cannot have SimplePortal in a different directory as the forum itself.
Otsikko: Re: Placing Forum in Folder
Kirjoitti: nathan89 - helmikuu 01, 2009, 07:40:43 IP
Is there a way to rewrite the index.php in .htaccess so that it will redirect to /community/index.php  ?
Otsikko: Re: Placing Forum in Folder
Kirjoitti: nathan89 - helmikuu 01, 2009, 07:57:56 IP
I used the following in my .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^crohnssociety.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.crohnssociety.com$
RewriteRule ^/?$ "http\:\/\/crohnssociety\.com\/community" [R=301,L]


Is this an acceptable practice and will I still get indexed in the search engines as (http://crohnssociety.com) and not (http://crohnssociety.com/community)

Otsikko: Re: Placing Forum in Folder
Kirjoitti: Tyrsson - helmikuu 02, 2009, 02:28:09 AP
If you don't already have a index.php file in your root directory


<?php
header
("Location:http://mysite.com/smf");
?>


Save this as index.php and upload it to the root of your hosting space.
Otsikko: Re: Placing Forum in Folder
Kirjoitti: nathan89 - helmikuu 02, 2009, 08:23:26 AP
Thank you, thats worked great!
Otsikko: Re: Placing Forum in Folder
Kirjoitti: Tyrsson - helmikuu 02, 2009, 09:19:46 AP
Glad it worked :)