News:

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

Main Menu

Directory doesn't match

Started by -Juliana-, April 08, 2013, 01:35:18 PM

Previous topic - Next topic

-Juliana-

How do I change a .com/smf   to just a .com

I change it and it says "■The URL and DIRECTORY name do not match"

Stanyy

Please can you explain it all in details?... I wont be able to help if I dont understand what you mean.

kat

You can use this to repair paths and the like, if you want to keep them where they are:

http://wiki.simplemachines.org/smf/Repair_settings.php

If you want to move things out of the "smf" directory, use FTP to move all the files. Then, put that same file in the same place that you're moving the files to, navigate your browser to it and follow the instructions on that page

Does that makes sense?

-Juliana-

Not really, I want to change it from being www.whatmysitenameis.com/ [nofollow]smf    to www.whatmysitenameis.com   

MrPhil

Hold on there. Do you have SMF installed into /smf and you don't like having to type in "/smf" all the time? It's best to leave SMF in its own directory (/smf) and either use a landing page /index.html or do a URL rewrite to jump visitors to your site from / to /smf. On an Apache server this is done with .htaccess:
RewriteEngine On
RewriteCond  %{REQUEST_URI}  !^/smf  [NC]
RewriteRule  ^(.*)$  /smf/$1  [L]


On IIS (Windows) servers, I think there's a way to do something similar.

Kindred

You keep saying that, Mr. Phil, but I don't see why...

I have SMF in the root directory on 5 different sites...
Сл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."

Arantor

Doing it that way is fine if you want to have multiple applications on the domain.

But if you aren't, and it's strictly a forum, then you're actually (provably) damaging SEO by having an extra 'click' to get from the front page to any actual content.

kat

All mine are in the root...

Quote from: K@ on April 08, 2013, 01:42:09 PMIf you want to move things out of the "smf" directory, use FTP to move all the files (Or CPanel's File Manager). Then, put that same file (Repair_Settings.php) in the same place that you're moving the files to, navigate your browser to it and follow the instructions on that page.

Seems the way to go, for me.

BTW, Juliana... If you don't do FTP, I'd suggest that you get into that. I really couldn't imagine doing "Website" stuff, without it.

http://wiki.simplemachines.org/smf/FTP_-_How_do_I_use_FTP

MrPhil

Quote from: Kindred on April 08, 2013, 03:10:52 PM
You keep saying that, Mr. Phil, but I don't see why...

I have SMF in the root directory on 5 different sites...

  • You'll never have to move SMF out of the root and into its own directory for sundry reasons, ruining all your search engine rankings and customer/member bookmarks.
  • You won't have SMF's .htaccess screwing up WP or some other application sitting in a subdirectory (or vice-versa).
  • Your root directory won't be cluttered with application files, risking erasing or damaging system files (*.shtml, .htaccess, robots.txt, favicon.ico, landing page...) and vice-versa (mangling SMF files when you meant to do something with system files).
  • You are free to swap out your .htaccess URL rewrite at any time for a landing page with no muss, no fuss.
I could probably think of more good reasons if I thought about it for a while.

Note that the proper URL rewrite is a 200 code (not 30x), so search engines, etc. will never know they got jumped from / to /smf. There's some discussion about whether you'll get dinged for going in to / and coming out at /smf, but I'm not sure that a search engine will ever see it.

Kindred

sorry... I don't actually consider any of those to be anything more than personal preference. As I say, I've had my sites in the root directory on most of my sites (and in one case, I moved it out of a subdirectory and into the root) and I have never encountered any issues even with other software running in other directories
Сл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."

Arantor

Of course, if you only run SMF as the main software and integrate portals, wikis or whatever into it, you don't really have a 'ermahgerd i need to run another app' moment ;D

MrPhil

Quote from: Kindred on April 08, 2013, 08:41:37 PM
I have never encountered any issues even with other software running in other directories

Then you've either been quite lucky or have been very careful about what you allow in the root .htaccess. There are lots of things you can put in the root .htaccess for (SMF) SEO etc. that end up having to be backed out or otherwise undone at a lower (WP) .htaccess level. And vice-versa, if something else is installed in the root. By putting all applications (including SMF) in subdirectories, the root .htaccess can be kept quite clean, containing only common site-wide settings -- add/delete www., define error documents, hotlink protection, etc. Of course, if you're willing to add all sorts of crap to the .htaccess to make SMF stuff only apply to SMF, WP stuff only apply to WP, etc, that's your call. I find that it's slower, is easier to mess up, and is harder to write and maintain (especially after someone inexperienced has taken over the site's maintenance). That's my recommendation and I'm sticking with it. It works for me and everyone I consult for.

Advertisement: