zsedc Posted November 28, 2008 Share Posted November 28, 2008 Hi I have htaccess file which deny from several files located in directory. <FilesMatch "^(druk.php|sitemapX.php|rssX.php)$"> AuthName "Przepraszam" AuthType Basic AuthUserFile /home/username/.htpasswd Require valid-user </FilesMatch> And now i would like also to block all URLs having "xyz" string. index.php?co=ktos&zmienna=xyz&id=20 would be denied because of "xyz" in there. Is it possible? How to do it? Many thanks Pawel Link to comment https://forums.phpfreaks.com/topic/134644-deny-several-file-and-regular-expression-htaccess/ Share on other sites More sharing options...
zsedc Posted November 28, 2008 Author Share Posted November 28, 2008 Ok, i got sollution: Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} zmienna=(xyz) RewriteRule ^index.php(.*) / [F] Link to comment https://forums.phpfreaks.com/topic/134644-deny-several-file-and-regular-expression-htaccess/#findComment-701135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.