News:

Wondering if this will always be free?  See why free is better.

Main Menu

Installed SMF in the wrong directory

Started by charlene1203, July 26, 2013, 11:12:32 AM

Previous topic - Next topic

charlene1203

does anyone know why when i put in my domain name hxxp:arcadehaven.co.uk [nonactive] 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 hxxp:arcadehaven.co.uk [nonactive] Port 80

ARG01

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
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

charlene1203

do you know how you fix it as i download it off Softaculous
am new to this

ARG01

No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

charlene1203


MrPhil

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.

ARG01

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.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

MrPhil

#7
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:

  • The root .htaccess can be for system-wide stuff only. If you have an application's .htaccess, other applications installed in subdirectories will have to go through this application's .htaccess first. This causes a lot of problems, and the simplest solution is to give each application its own .htaccess in its own root.
  • Your system files (.htaccess, favicon.ico, error pages, robots.txt, etc.) and any landing page are cleanly isolated from all applications. You can change or even remove your primary application without worrying that you'll break some system files.
  • No need to invalidate all your visitors' bookmarks and search engine listings by changing the primary application, such by moving it down to a subdirectory or vice-versa.
  • You can do things with the system files without fear of damaging your primary application. Is that file something system-wide or does it belong to this application?
  • You can add a landing page with links to your application(s) at any time, without worrying about whether your primary application has already reserved index.html or even index.php.
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.

Kindred

:)

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.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

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.

Advertisement: