Do you support mod_rewrite?

Yes, mod_rewrite is fully supported. mod_rewrite is a great apache module and we are happy to allow its use.

You can enter mod_rewrite rules into a standard .htaccess file. The rules will have effect over all files in that directory and in all directories “below” that directory.

Please note that due to the complex nature of mod_rewrite rules, we are not able to offer debugging assistance with your rules.

I’d like to run cgi’s from anywhere in my site – not just the cgi-bin directory.

Question :

I’d like to run cgi’s from anywhere in my site – not just the cgi-bin directory.

Answer :

Create a .htaccess file and add the lines:

AddHandler cgi-script .pl
AddHandler cgi-script .cgi

to it.

Add other AddHandler statements if you are using different file extensions.

I wrote a very basic cgi script but it doesn’t work

If you are trying to write a basic “hello world” type cgi but keep getting:

500 error response – Internal Server Error

Make sure the first line of output from your script is:

print “Content-type: text/htmlnn”;

All cgi’s (in any language) need to output a header line, followed by two newline characters (n) before any “regular” output is done from the script.

Also, check that you have made the script executable :

From the ssh command line, issue this command :

chmod u+x name_of_script here

or from inside most FTP programs:

1. click properties for the file and select “Change permissions” or “chmod”

The wording will vary from one FTP program to another.

Can I point a subdomain to a cgi script?

Question:
Can I point a sub domain at a cgi script?

Answer:

A subdomain in DNS can only point to an IP. A full URL (ie. a script) is above the level of DNS. DNS only understands
IP’s and domain names. Not full URLs.

You can use the 403 redirect option to have the webserver forward the subdomain request to the URL.

Another approach is to point the subdomain to a sub-directory in the control panel and then have that sub-directory’s index page immediately redirect to your cgi script. You could also use .htaccess to make the filename for your script be one of the index pages.