/    Sign up×
Community /Pin to ProfileBookmark

Hello,

I’ve been given a project to solve a problem and I’m not sure how to do it.

We have a web site shows that everything is down 2 directories. For example if I want to go to [url]http://website.com[/url] once the browser is there, the browser returns [url]http://website.com/website.com[/url].

Everthing in the site is under this double listing. Where can I make a change so that the site shows up as [url]http://website.com[/url] instead of [url]http://website.com/website.com[/url] ?

Thank you

Jesse

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@auntniniJan 21.2015 — Not quite sure what you mean? But it sounds like you've messed up your host/server directory. For instance, content I upload for my DotEasy.com sites are in sub-directories named public_html. There are also directories that reflect a duplication of the URL, etc. If I have any question about the online host/server directories, I contact their HELP.

Do you use an FTP program (such as Dreamweaver) that allows you to view your online directory?
Copy linkTweet thisAlerts:
@JesseRauthorJan 21.2015 — ^Thank you for the reply.

I inhered this project so don’t know the history.

There is a root or top level directory which is where DNS takes the browser, all of the content related to the site is under a directory name with the same name as the DNS domain name. I’m pretty sure that is the reason it shows up as http://website.com/website.com.

The odd thing about this is that at another site I’ve worked on, there is a root or top level directory, and then a site with the same name as the domain name, yet when browsing this site it appears as http://website.com. Due to that I’m guessing there may be a way to specify a top level directory at a site, or otherwise suppress the sub directory name, but I don’t know how that may be done.....
Copy linkTweet thisAlerts:
@JesseRauthorJan 22.2015 — A brief follow up. I figured it out. There was a combination of issues.

First is that someone created a directory name of website.com under the default website, which also goes by the same name. Due to that we ended up with http://website.com/website.com

Next there was no default document specified in the .htaccess file, or anywhere else. So even when someone went to the appropriate directory, no document was loaded, but instead only a directory listing. Worse is that under the .htaccess file there was a command line named IndexIgnore within the .htaccess file as one of the things it was configured to ignore!

Next there were 1 of 2 files under different names which were supposed to load but which had the same content.

Next because of all the issues above, someone put a redirect with cpanel to load the default file.

This all added up to a bit of head scratching.

I removed the redirect in cpanel and the unneeded items in the .httaccess file and then added a command that reads: DirectoryIndex Welcome.html and then deleted the duplicate of this file that was in a different name. After those changes it worked just as it is supposed to.

At some point we will rename the second directory named website.com to just web or something similar and that will resolve the remaining issue.

I don’t do this kind of project every day so it was fun to work it through. Thanks for those who stopped by to have a look.
×

Success!

Help @JesseR spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...