Web Servers on Unix and Linux - Apply RewriteRule only on index pages

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > June 2004 > Apply RewriteRule only on index pages





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apply RewriteRule only on index pages
blnukem

2004-06-20, 11:13 pm

Hi All

Is there a way to apply a RewriteRule only on index pages say index.htm &
index.html that will call a script? Here is what I'm using now but it
applies it to every page viewed.

RewriteRule . /cgi-bin/script.pl

Thanks in advance
Blnukem


Klaus Johannes Rusch

2004-06-20, 11:13 pm

blnukem wrote:

> Is there a way to apply a RewriteRule only on index pages say index.htm &
> index.html that will call a script? Here is what I'm using now but it
> applies it to every page viewed.
>
> RewriteRule . /cgi-bin/script.pl


ScriptAlias /index.html /www/cgi-bin/script.pl

or (my preferred option)

DirectoryIndex index.html /cgi-bin/script.pl ...

--
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com