School of Computing. Dublin City University.
Online coding site: Ancient Brain
coders JavaScript worlds
Here are different approaches to dealing with URL case-sensitivity:
User | Relationship between URL and file system | What happens if case wrong | Example of correct case | Example of incorrect case |
Normal user's personal webspace on:
www.computing.dcu.ie |
Direct | 404 Not Found | Correct | Incorrect |
Sysadmins running department webspace on:
www.dcu.ie |
Indirect. Content management system. URL seems to be address of an object in its database. | Content management system can implement its own case-insensitive addressing. | Correct | Incorrect |
My own website:
humphryscomputing.com |
Direct | 404 triggered, but I re-direct the error to my own 404 PHP handler program to do case-insensitive and partial matching. | Correct | Incorrect |
To summarise,
I set up for my site
a case-insensitive site
using a
404 PHP handler.
You can try this out on your own account on:
student.computing.dcu.ieRecipe is as follows.
Put a .htaccess file in:
This .htaccess file has a line to redirect 404 to a program:$HOME/public_html/.htaccess
ErrorDocument 404 /~myuserid/404.php
Help files:
Some notes:
ErrorDocument 404 /~myuserid/404.php ErrorDocument 403 /~myuserid/404.php