New answers tagged

0

Since you've not clarified the specifics of your question, I'll make some assumptions: You wish to redirect to a different domain. eg. example.net example.net points to a different server. /CDadmin is a physical directory on the filesystem. At the top of the .htaccess file in the document root of example.com, place the following: RewriteEngine On ...


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 ...


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 ...


2

The problem here was ErrorDocument which doesn't interpolate server env vars...


2

All these appear to redirect OK for me (ie. http://bbrown.kennesaw.edu/it3203/2016_02/lab_7s.html redirects to http://ksuweb.kennesaw.edu/faculty/rbrow211/it3203/2016_02/lab_7s.html). So, this would seem to suggest a local caching issue. If you've previously experimented with erroneous 301 redirects, then these will have been cached by the browser and ...


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 ...



Top 50 recent answers are included