Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML case sensitive issue [duplicate]

Tags:

html

Possible Duplicate:
HTML Case Sensitive Issues

I have this:

<div class="menuHolder">
  <nav class="menu">
    <ul id="menu">
      <li class="with_ul"><a id="panorama"><span class="overPlane"></span><span class="mText">panorama</span></a>
        <ul class="submenu_1">
          <li><a href="abc.html">Test</a></li>
          <li><a href="#!/pageMore">Profile</a></li>
          <li><a href="#!/pageMore">History</a></li>
        </ul>
      </li>
    </ul>
  </nav>
</div>

I have a file called aBc.html already

When I clicked on Test, I get a 404. If I change the line to

<li><a href="aBc.html">Test</a></li>

it works fine.

I know that HTML is not case sensitive, but then why is this happening? Did I do anything wrong?

like image 888
Chin Avatar asked Feb 19 '26 03:02

Chin


1 Answers

A URL is case-sensitive past the domain name. example.com and EXAMPLE.COM both resolve to the same address, but anything after the domain name is case-sensitive.

Now come the filesystems. Windows uses NTFS, which is not case-sensitive, so abc.html and aBc.html refer to the same file. Most Linux distros use EXT4, which is case-sensitive, so abc.html and aBc.html are two different files.

In short, your webserver is running on a filesystem where filenames are case-sensitive, so abc.html and aBc.html refer to two different files.

like image 178
Blender Avatar answered Feb 21 '26 18:02

Blender



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!