Rewrites and CGI


The newly installed wiki caused the cgi scripts on this site to stop functioning. The actual culprit was the URL rewrites that were used with wiki to translate 'ugly urls' (as mediawiki authors call it) into the 'good looking' URLs that you see on the Wiki section of this website. The exact error was :

Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden

This error unforunatley made it impossible to access the online demo for the megaupload project for a few days (I added the wiki a day after the new release and didn't bother to test the perl scripts afterwards)

Solutions were penny a dozen a when you searched for that error in google, unfortunately many of those solutions had apparently not worked for the original posters. The common consensus was that if your CGI stopped working you need to add the Options +FollowSymlinks to your httpd.conf or .htaccess .

In my case adding the Option to my .htaccess file simply did not work (as many others had found before me, (many of them appear to have given up all together), it seems the directive has to go into the httpd.conf file - or to be more precise it needs to be placed with in the <Directory/> tags as follows:

<Directory "/home/raditha/websites/raditha/cgi-local/">

AllowOverride None

Options +FollowSymlinks

Order allow,deny

Allow from all


Just in case you think me stupid for sharing part of my configuration file, this is not from the server but from my desktop.

comments powered by Disqus