This is a discussion on rewrite and filesmatch within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello. I've got a question about rewrite and filesmatch working together in one .htaccess file. I'm rewriting all ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello.
I've got a question about rewrite and filesmatch working together in one .htaccess file. I'm rewriting all the request to '/cgi-bin.*' to main '/' but various hack scans search for the .pl and .cgi files also in other directories so I denied all files enging with .pl and .cgi using <filesmatch> as follows: <FilesMatch "\.pl|\.cgi$"> Order Deny,Allow Deny From all </FilesMatch> when my server has a request http://server.com/cgi-bin/dir1/dir2/ it will be redirected by rewrite but when the request is: http://server.com/cgi-bin/dir1/dir2/my_script.pl <FilesMatch> is being called...(coz of .pl) and one more question.... about rewrite and queries... on my Slack I've got request /_vti_bin/owssvr.dll?UL=1&ACT=4&BUILD=4219&STRMVER=4&CAPREQ= 0 and i redirect them to main page using: RewriteRule ^_vti_bin.* / [R] but after redirect i have address of: http://server.com/?UL=1&ACT=4&BUILD=...VER=4&CAPREQ=0 can i skip somehow the query? thanks in advance greetings R |