.htaccess redirection for specific foldername followed by specific scriptname in url
Assume the following as the url structure
In my logs i can see users requesting the above url for exploitation as follows
for which i am sending 404 as response
i wanted to block those request from the htaccess level and not from my php code. entirely.
previously i had been hit by requests like the following
so after searching the internet i added a redirect rule in my htaccess which is saved in /projectname like the following
for a while i did not get any of such requests. and then recently users started requesting like the following
RewriteRule ^(.*)subsection/scriptname(.*)$ /index.php [F,L]
RewriteCond $1 !^(index\.php|images|css)
RewriteRule ^(.*)$ index.php/$1 [L]
#RewriteRule ^(.*)$ ./index.php?/$1 [L]
I want to know how to add redirect rule which will redirect it to index.php from htaccess?