| Posted: 29 July 2008 at 7:09am | IP Logged
|
|
|
Hi Lexey,
Thanks for the reply, ok some months ago we noticed search engine
indexing our URL’s with additional queries added to the end.
An example of this would be www.example.com/directory/index.htm?we_sent_you_traffic
At the time we needed some of these URL’s to be allowed due
to advertising on an external site so this rule was implemented as below:
RewriteCond
Host: (?:www\.abcl\.com.*)
RewriteCond URL .*\.htm [O]
RewriteRule ([^?]*\.htm)\?(?!source=).* http\://www.abcl.com/error/404_test.asp
[U,CL,L]
Which disallowed
everything that we thought wasn’t necessary, now we are seeing search engines
indexing URL’s which slipped passed the above rule.
As we are
no longer needing the above rule to allow ?source= I’d like to be able to stop all traffic that’s
coming in to .htm file that has any character added after the first.htm file
extension, I say this because I’ve also seen my server giving access to URL’s
that contain two separate .htm in a single URL.
When adding this to the file it didn’t deny access to URLs
that had / added to the .htm file.
RewriteCond
Host: (?:www\.abcl\.com.*)
RewriteCond URL .*\.htm [O]
RewriteRule [^?]+\.htm/.* $0 [I,F]
If you could explain where I’m going wrong or give me
another example that will deny access to any thing requesting additional
characters to .htm files I would greatly appreciate it. Regards, Deepak
|