skip to Main Content

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

Mod rewrite redirect every subdirectory to the same file – Apache

I have a website with a products.html file. Now, inside this file, I will have some Javascript code that checks the url to show the correct products/categories. This are some examples of the urls: example.com/products example.com/products/ example.com/products/shoes example.com/products/shoes/ example.com/products/shoes/adidas example.com/products/shoes/adidas/…

VIEW QUESTION

htaccess to hide some folders and seo

I have a site with the following folder structure /folder1 /folder2/folder3 /othfolder1 /othfolder2 I would like to obtain this mysite.com -> will show content of /folder1 (without showing the folder on URI, ok for subfolders) mysite.com/folder3 -> will show content…

VIEW QUESTION

Redirect and change URL with Apache/htaccess

I want to change/redirect URIs with http/https in this way: from: http:// or https://xyz.lastdomain.com/b/custom/any-string/456?foo=bar to: https://custom.nextdomain.com/b/any-string/456?foo=bar the custom string should be in the new URL and everything from b so as the end of the URI should be appended. I…

VIEW QUESTION
Back To Top
Search