/    Sign up×
Community /Pin to ProfileBookmark

How Do I Prevent My Entire URL From Displaying ? And Make Only The Directory Show ?

I have a website that I built in dreamweaver and is hosted on justhost.com.

I want my url to say [url]www.mywebsite.com/directory/[/url]

but instead it displays [url]www.mywebsite.com/directory/index.html[/url]

I read multiple articles that stated if I simply changed my main html file in the directory to index that it would only display the directory but all my pages still display

[url]www.mywebsite.com/directory/index.html[/url]

instead of

[url]www.mywebsite.com/directory/[/url]

which is what I want, If anyone could tell me what I need to do to make my website do this it would be greatly appreciated. again I’m using dreamweaver to do my coding and my website is hosted on justhost.com

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@coldfire421Apr 18.2011 — its not about your code in the html. its about the server configuration where you hosted your site. by default web server configuration look for index.html or index.php or home or default. depend on the server configuration.
Copy linkTweet thisAlerts:
@magalhApr 27.2011 — look for the .htaccess file at the root of the site and add the following:

RewriteEngine on

rewritecond %{http_host} ^yoursite.com [nc]

rewriterule ^(.*)$ http://www.yoursite.com/$1 [r=301,nc]

Should do the trick
Copy linkTweet thisAlerts:
@mirza_yasir4Apr 27.2011 — You need to play with .htaccess file
×

Success!

Help @eperkins153 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...