Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: charlene1203 on July 26, 2013, 11:12:32 AM

Title: Installed SMF in the wrong directory
Post by: charlene1203 on July 26, 2013, 11:12:32 AM
does anyone know why when i put in my domain name arcadehaven.co.uk but all i get is


Index of /

      Name                                Last modified         Size  Description
   
directory smf                                 26-Jul-2013 16:24        -       
Proudly Served by LiteSpeed Web Server at arcadehaven.co.uk Port 80
Title: Re: hi there
Post by: ARG01 on July 26, 2013, 11:17:56 AM
You seem to have your SMF instal in a sub-directory as opposed to your root.

Installed here:
http://arcadehaven.co.uk/smf

Should be installed here:
http://arcadehaven.co.uk
Title: Re: hi there
Post by: charlene1203 on July 26, 2013, 11:19:57 AM
do you know how you fix it as i download it off Softaculous
am new to this
Title: Re: hi there
Post by: ARG01 on July 26, 2013, 11:22:32 AM
This will explain things better than I can.  ;)

http://wiki.simplemachines.org/smf/How_do_I_install_SMF
Title: Re: hi there
Post by: charlene1203 on July 26, 2013, 11:39:56 AM
thank you
Title: Re: Installed SMF in the wrong directory
Post by: MrPhil on July 26, 2013, 01:49:01 PM
It's best to install in its own subdirectory /smf or /forum, AS YOU DID. Leave it there and add a URL rewrite in your /.htaccess file (assuming you're on an Apache / "Linux" server):

Options -Indexes

RewriteEngine On
RewriteCond  %{REQUEST_URI}  !^/smf  [NC]
RewriteRule  ^(.*)$  /smf/$1  [L]


I added a command to turn off automatic index generation, which is a good idea.

When you add another application (blog, store, gallery, etc.) you can put in a /index.html or /index.php landing page with links to direct visitors to various applications such as the Forum. Then you can remove the URL rewrite.
Title: Re: Installed SMF in the wrong directory
Post by: ARG01 on July 26, 2013, 04:49:38 PM
Sorry, I was under the impression that she wanted SMF in the root. Of course installing in a sub-directory if fine but if I want SMF as my main site then I always install in the root.  ;)
Title: Re: Installed SMF in the wrong directory
Post by: MrPhil on July 26, 2013, 06:11:29 PM
What she wanted was to avoid having a manual step of going through the index page or adding /smf to the URL. I strongly feel that installing SMF in (or moving it to) the root is a very bad solution, and instead recommend installing any application into its own subdirectory for the following reasons:
They can use URL rewriting to auto-jump to the application so long as it's the only one, avoiding a manual step or a longer URL. When they install another application, then can put in a landing page in the root and remove the rewrite.
Title: Re: Installed SMF in the wrong directory
Post by: Kindred on July 27, 2013, 09:03:52 AM
:)

MrPhil and I have a philosophical disagreement on this subject.
Personally, I am in favor of putting the forum (or whatever the main software of the site is going to be) into the root.

1. each .htaccess can be defined at each level including the root. If you have other applications and .htaccess files, there MAY be interference, but it can be worked around. It MAY cause problems... but then again, it may not.
2. I disagree with this argument completely. :P
3. if I don't move it, there's no need to break it. So I can put it in the root just as easily as putting it in a subdirectory
4. Most people have no idea how to edit system files anyway. If they have to be instructed, as most will, they can be instructed in how to do with without breaking the application.
5. SMF has the capabaility to add a landing page internal to itself, with several mod options.

Anyway... there are benefits to leaving it in a subdirectory. There are also benefits to leaving the forum in the root.
I have it set up both ways across my many sites - all depending on the site and what is going to be done with it.

Title: Re: Installed SMF in the wrong directory
Post by: MrPhil on July 27, 2013, 03:17:13 PM
Quote from: Kindred on July 27, 2013, 09:03:52 AM
MrPhil and I have a philosophical disagreement on this subject.
I'd say we can agree on that.

I push for putting major applications into their own subtrees simply because of all the trouble people get into putting something in the root and then trying to hang other applications off on subtrees. Just look at all the topics on this forum asking for help in moving an SMF installation from subdirectory to root (or vice-versa) [and the bookmark and search engine consequences of that], and asking for help because their Wordpress root installation is interfering with their SMF subtree (or vice-versa). All the points I raised can certainly be dealt with if you are an expert with .htaccess, will never move an application no matter what, are so incredibly well organized that you know off the top of your head which root files go with which application, and never make a misteak... er, mistake. Most people trying to run a web site are none of those, and get into trouble unless they follow rigid rules for cleanly separating applications. If you're so good that you can handle this stuff blindfolded, fine. But please think twice about advising inexperienced people to do things the complicated way. In practice, it only brings misery to them.