Unstoppable Domains โ€” Get your daily AI drops report

"index.html" vs "/" - bad idea?

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
Watch
Impact
0
I have spent a good bit of time changing all the links in my site from ones that explicitly used "index.html" as the target to ones that use directory hierarchy and defaults (ie. "/" maps to "/index.html", "/index.php" etc.)

Now I'm wondering if this is commonly done, or whether this is bad practice?

I used to have a flat design with hundreds of pages, but named them hierarchically using the hyphen character "www.sitename.com/topic-subtopic-subsubtopic.html". Then, I figured it would make more sense to create at least one level of directories, so that the main topics can be found by "www.sitename.com/topic/" instead.

The reason for this was that I was thinking of changing some of my pages to use PHP instead of plain HTML. Because a lot of sites are linking to the main topic pages (eg. topic.html), I don't want to have to keep setting up 301 redirects (from topic.html to topic.php). Plus, it seems more organized.

However, I am wondering whether this was the right thing to do.... When I'm using Dreamweaver MX, it doesn't seem to know how to resolve links to "/topic/" into "/topic/index.html" for the purposes of "broken link" checking. Plus, it obviously won't maintain the updates correctly now because it doesn't know how to resolve the directory defaults.

I am now questioning this methodology.

Can someone please clear this up for me?

Any help would be greatly appreciated!
Cal.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
domain.tld/ or domain.tld/index.html really doesn't matter, just try to use the same allover. Myself I think that just the slash looks alot cleaner for the homepage. For the same reason I prefer using sub-directories, or even virtual sub-directories for some dynamic pages.

Usually you shouldn't have to change extension to .php from .html to be able to use PHP in the files. For example adding 'AddType application/x-httpd-php .htm .html' in a .htaccess should give you that result (adding some very minor overhead to files w/o php).

As for Dreamweaver problems I can't help at all I'm afraid. Have spent about one hour infront of it during the last 3-4 years. I do know however, that when your ideas are causing the problems with your development suite and nothing else ... your should try looking at alternative development suites rather than different solutions.
 
0
•••
Here is something that can happen:

I started web development in 1994 when changing ISP regularly was quite common. When M$ brought out their sad excuse for a web server, it broke all the standards that had been established by the web gods. M$ had 3-char file extensions (.htm) and home.htm being the default home page instead of index.html

If you were porting over a website from a UNIX box, you had alot of work to do. One solution was to change server settings but getting the ISP to do this was like pulling teeth. I learned to refer back to default pages by name so at least back links worked while I did other necessary changes, ie: I refer to /index.html, just incase my site finds its way onto a different server.

I can't help you with PHP and Dreamweaver. I still like my Perl and Textpad.
 
0
•••
Appraise.net
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back