« Real World: Book your… | Home | MBS Filemaker Plugin,… »

Tip of the day: Web apps without name.cgi in URL

While doing a remote session with client on setting up a webserver for a web app made with Real Studio with Amazon EC2, we got a question: Can we remove the name.cgi easily from the URL?

So which URL is better?To get this working, you'd need to make a copy of your cgi file and upload it as index.cgi. Make sure the line endings are right (unix, LF) and you set permissions to 755.
Next you edit the .htaccess file.
First you need to add "-Indexes" to the options on top. And you need to add this to the file on bottom:
<Files ~ "^$">
allow from all
</Files>
The first change will disable normal directory indexes and second change allows the default file to be accessed.
If you do everything correct, you can remove name.cgi from the URL and enjoy a little bit shorter URL.
21 03 13 - 22:55