Question

i'm using IsapiRewrite from helicontech for my custom classic ASP shopping cart. My actual httpd.ini file is:

[ISAPI_Rewrite]
RewriteBase /
RewriteCond %HTTPS off
RewriteCond Host: (?!^www.domain.com)(.+)
RewriteRule /(.*) http\://www.domain.com/$2 [I,RP]
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [I,O]
RewriteRule /(.+)-([^-]*)-([^-]*)-([^-]*)\.html$ /detail.asp?brand=$1&model=$2&id=$3&lg=$4 [L]

So i'm actually using this component only to rewrite the product detail page in a nice way. Lately looking in google cache i find some folders with files inside cached by googleBot that doesn't exist on my server eg: domain.com/carrera-CHAMPION ... and so on. The page drawn if i access these strange pages is the detail.asp page but without css and some js loaded. I tested recently the site with Acunetix scanner and seems like he found too these strange folders. First i added a javascript check to se if Jquery not loaded then that means the page is one of these so i throw an alert and redirect user to homepage .. Do you know what could be ? or how i could solve this via a rule in httpd.ini?

Hope i make myself clear if no feel free to ask me details, thank you

Était-ce utile?

La solution

Can you confirm that when you disable ISAPI_Rewrite these strange pages/folders disappear? Please note that ISAPI_Rewrite only rewrites response headers and can't generate anything, so it's highly unlikely to be the cause of the issue.

BTW, your config is the mixture of ISAPI_Rewrite 2 and 3 syntax. If it's v2, please fix it like this:

[ISAPI_Rewrite]
RewriteCond %HTTPS off
RewriteCond Host: (?!www.domain.com).+
RewriteRule /(.*) http\://www.domain.com/$1 [I,RP]
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [I,O]
RewriteRule /(.+)-([^-]*)-([^-]*)-([^-]*)\.html$ /detail.asp\?brand=$1&model=$2&id=$3&lg=$4 [L]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top