skip to Main Content

Replace query string with file extension using htaccess – Apache

I have this link https://career.guru99.com/top-50-oops-interview-questions/?format=pdf I want to redirect it to https://career.guru99.com/pdf/top-50-oops-interview-questions.pdf I created the following htaccess rule RewriteEngine On RewriteCond %{QUERY_STRING} format=pdf [NC] RewriteRule ^top-50-oops-interview-questions /pdf/top-50-oops-interview-questions.pdf? [R=301,L] But the challenge is I have 200+ links and I will have…

VIEW QUESTION

How RewriteCond test the Useragent – Apache

I try to block some bots using RewriteEngine and htaccess. For DotBot and similar bots I found many scripts like: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^DotBot RewriteRule ^.* - [F,L] I understand everything with one exemption: Why most sites use ^DotBot…

VIEW QUESTION
Back To Top
Search