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

.htaccess Redirect all pages except one and another internal redirect of a certain domain – Apache

I want to redirect all request of one particular domain to another, except for one page request. I hope my attempt explains what I try to do: RewriteEngine on Rewritecond %{HTTP_HOST} !^host.mysite.com RewriteRule ^link/([^/]+)/([^/]+)/([^/]+)$ dokument_by_link.php?$1=1&document_type=$2&value=$3 [NC,L] Rewritecond %{HTTP_HOST} !^host.mysite.com RewriteCond…

VIEW QUESTION
Back To Top
Search