Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:06:57+00:00 2026-05-29T10:06:57+00:00

Is this bad practise in any way? The folder structure (every html page has

  • 0

Is this bad practise in any way?

The folder structure (every html page has filename index.html located in a subfolder):

root-folder (index.html)
  subpage1 (index.html)
  subpage2 (index.html)
  subpage3 (index.html)

Index.html in root folder will have menulinks and like this:

<a href="/">index</a>
<a href="/subpage1">subpage1</a>
<a href="/subpage2">subpage2</a>
<a href="/subpage3">subpage3</a>

All other index.html files in the subfolders/subpages will have menulinks like this:

<a href="../">index</a>
<a href="../subpage1">subpage1</a>
<a href="../subpage2">subpage2</a>
<a href="../subpage3">subpage3</a>

Links to css, javascript, favoicon will also have this link structure.

I think the cleanest way would be to have links like this on every page. But it’s complicated to work with if you want to try out the page in a subfolder…

<a href="/">index</a>
<a href="/subpage1">subpage1</a>
<a href="/subpage2">subpage2</a>
<a href="/subpage3">subpage3</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:06:58+00:00Added an answer on May 29, 2026 at 10:06 am

    The problem I have with an approach like this is that all your files are called ‘index.html’ and it’s difficult to tell in your editor which is which. Also you have the problem of opening/closing each folder to navigate around and make edits, yuck.

    What you can do to get the url’s that you want is to use something like mod_rewrite to turn those nice-urls into the real filenames.

    Add something like this for your .htaccess file:

    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^([^\.]+)$ $1.html [NC,L]
    

    And in all your pages you’ll be able to have links like the last example:

    <a href="/">index</a>
    <a href="/subpage1">subpage1</a>
    <a href="/subpage2">subpage2</a>
    <a href="/subpage3">subpage3</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I'm doing this a bad way... but I'm having trouble seeing any
I got this bad feeling about how I insert larger amounts of HTML. Lets
Why does everyone tell me writing code like this is a bad practice? if
First off, I'm aware this is a bad practice and I have answered many
Is it bad practice to concatenate objects when used in this context: $this->template->head .=
I realize that this would be COMPLETELY bad practice in normal situations, but this
Is it a bad practice to mix GET and POST? (note this is in
Possible Duplicates: Why is lock(this) {...} bad? In C# it is common to use
Is this a bad idea? Private Class GH_DataStructureEnumerator(Of Q As Types.IGH_Goo) Implements IEnumerable(Of Q)
if this is a bad idea, how to allocate memory in the function?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.