httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nelson Goforth <>
Subject [users@httpd] Rewrite - difficulty with substitution
Date Sat, 25 Jan 2003 16:18:05 GMT
The id numbers I'm using in an online database have changed, and so I'm 
trying to force the search engines to update their links to internal 

I want to force Referers others than my own site to go to the index 
page, rather than to the perl script that drives the system.

I've ALMOST got it working with:

	RewriteCond %{HTTP_REFERER} !^http://www.myserver.*
	RewriteRule ^cgi-bin/(.+)$ [L,R=301]

However, assuming the link was to 
".../cgi-bin/",  the URL is being rewritten as:

Which I don't want - just "index.html", please!

I don't know why the substitution is being performed.  Before I put the 
(.+) memory in place in the Rule the entire request was being added on 
(like and would get a 404 
error or worse.  So I tried to capture EVERYTHING after the /cgi-bin 
and then just NOT use it.

Any ideas what I'm doing wrong?

Thank you,

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message