Hot answers tagged

2

i want to make infinite redirection because i dont want facebook bot crawl my site. if do in the normal way, the facebook also trace my website, and when I share in highly frequency mysite on facebook then my website will be blocked. if make facebook bot stuck in redirect it can not trace mysite – Sheng Long That tactic'll work perfectly, if you want to ...


2

RewriteCond %{REQUEST_URI} \/modeles\.php [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule brand=([A-Z][\-A-Za-z]+)&model=([\-A-Za-z0-9\.]+$) http://www.soeezauto.com/modeles-voiture/$1/$2 [R=301,L] You can't match the query string with the RewriteRule pattern. The RewriteRule only matches against the URL-path ...


2

You can do this with mod_rewrite, for example: RewriteEngine On RewriteRule ^blog/(apple|oranges|bananas)/ /blog/fruit/ [R=301,L] This literally redirects just the 3 URLs listed in the question. If you wanted to redirect from /blog/apple/<something> to /blog/fruit/<something> then you can modify the above RewriteRule to: RewriteRule ...


1

It's most likely caching issue. Ask your customer to directly visit http://pub.biotinel.fr/bastide/ and check if he can see the content of the folder. Also, you may ask your customer to visit http://pub.biotinel.fr/?v=1 - this will most likely fetch the page again and he should see bastide folder.


1

This will use for both www or non-www If you try to open link with www then url redirect to https with www Example: http://domain.com redirect to https://domain.com or If you try to open link with non-www then url redirect to https with non-www Example: http://www.domain.com redirect to https://www.domain.com RewriteEngine on RewriteCond ...


1

I tried to add this into .htaccess file: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit|FacebookExternalHit|Facebot) [NC] RewriteRule ^(.*)$ ^$1 [R=302] As already stated you don't "redirect", and certainly don't try to create an "infinite redirect", in order to block traffic. Purposefully creating an "infinite redirect" for any ...


1

As a work around, I am proxying the web service: My SSL Hosting (Angular Project + Newly created proxy web service) AWS (Old Web service + MySql Database) From angularJS i call newly created proxy (that just uses cURL). This cURL code passes request to AWS server over HTTP.


1

mod_rewrite directives execute top-down, so the most specific rules should come before the more general rules. In your code above you need to reverse code Block#1 and Block#2. ie. check for 3 URL params before checking for 2 URL params. Alternatively, match the exact URL (rather than just a prefix) in the CondPattern (2nd argument to the RewriteCond ...



Only top voted, non community-wiki answers of a minimum length are eligible