Log in

No account? Create an account
an albuquerque not animate be armada. [entries|archive|friends|userinfo]
Okrzyki, przyjaciel!

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Stupid Web Tricks — Fun With 404 [Mar. 10th, 2009|06:22 pm]
Okrzyki, przyjaciel!

A real directory on my web server

A non-existent directory on my web server

This is a really simple trick for hiding a directory in plain site on your web server — give it a index.html file that looks just like your 404 not found page. At least on my server, they are identical. In order to see that one directory is real, and that the HTTP request succeeded, you’d have to look at the raw data transmitted back in response to the URL request.

This allows me to send direct links to files (or an alternate html file giving the real contents of the directory), but a casual visitor won’t know what’s up.

I don’t claim to have discovered this, but it’s a cute trick. And it lets me show off my “Life On Mars”-centric 404 page.

Originally published at Do My Eyes Look Scary?. You can comment here or there.