I would like redirect all my URL to https. But it doesn't work. My .htaccess below. Could you help me please ? Something wrong ? Many thanks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^192.168.1.201
RewriteCond %{HTTP_HOST} !^www.vilabea\.com
RewriteRule ^(.*)$ https://www.vilabea.com/$1 [R=301,L]
RewriteRule ^fr/evenementiel$ https://www.vilabea.com/fr/les-seminaires [R=301,L]
RewriteRule ^fr/les-services$ https://www.vilabea.com/fr/le-restaurant [R=301,L]
RewriteRule ^fr/le-spa$ https://www.vilabea.com/fr/detente-et-bien-etre [R=301,L]
RewriteRule ^es/el-spa$ https://www.vilabea.com/es/descanso-y-bienestar [R=301,L]
RewriteRule ^fr/index_new\.php$ https://www.vilabea.com [R=301,L]
Related
Here is my Rewrite Rule :
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule "^/q/(a-zA-Z0-9)*/?$" "/#/q/$1"
Something does not work, I don't understand what.
I want to redirect /q/xxx to /#/q/xxx
How can I do it ?
here is the solution: RewriteRule ^q/([a-zA-Z0-9-]+)/?$ /#/q/$1 [L,NC,R=301,NE]
The flags were missing
I want to set up the redirect, which would bring any user from
http://vps.domain.com/~access/ (and subfolders, such as /~access/user etc.)
to
http://www.example.com
What's the Rewrite rule I have to use?
Will that one work?
RewriteCond %{HTTP_HOST} ^vps.domain.com/~access/$
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Thank you!
You can place this rule in ~access/.htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^vps\.domain\.com$ [NC]
RewriteRule ^ http://www.example.com/ [L,R=301]
RewriteCond %{HTTP_HOST} ^vps\.domain\.com [NC]
RewriteCond %{REQUEST_URI} ^/~access/
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Original url: example.com?file=gallery&d=doc
I want: example.com/gallery.html
My .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteRule ^([^/]*)\.html$ /?file=$1&d=doc [L]
(removed d=doc from url because this not needed)
Now clean URL's work but I want 301 redirect all old URL's (?file=example&d=doc). Anyone can help me with .htaccces? Now page is availiable from example.com?file=gallery&d=doc and example.com/gallery.html but should be ONLY from example.com/gallery.html.
Try this :
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.med-pro.pl$
RewriteRule ^(.*)$ http://med-pro.pl/$1 [R=301,L]
RewriteRule ^([^/]*)\.html$ /?plik=$1&d=doc&r=0 [L]
RewriteCond %{QUERY_STRING} ^plik=([^&]*)&d=doc$
RewriteRule .* %1.html? [L,NC,R=301]
I want to make subdomain redirect with "www", but this did not work:
RewriteCond %{HTTP_HOST} !^www\.(blog\.)?example\.com$ [NC]
RewriteRule .? ht-tp://www.%1example.com%{REQUEST_URI} [R=301,L]
Try this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.([^.]*)\.example\.com$ [NC]
RewriteRule ^(.*)$ http://www.%1example.com/$1 [R=301,L]
Hope that helped!
Trying to get a simple 301 redirect with htaccess using this code:
Redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/
The results are sending me to
http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/?page=cat/radiator-cages/product/radiator-support-cage
Any idea what I'm doing wrong?
Thanks in advance for any help.
--Update--
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
RewriteRule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [L,NC]
Redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/
I suggest trying to use the Redirect 301 statement first.
Your htaccess should then look somthing like this
Redirect 301 /cat/radiator-cages/product/radiator-support-cage/ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
RewriteRule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [L,NC]
Edit:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
RewriteRule ^/cat/radiator-cages/product/radiator-support-cage/$ http://www.mysite.com/product/radiator-cages/custom-radiator-support-cage/ [R=301,L]
RewriteRule ^product/(.*)/(.*)/$ /index.php?page=product&parent_url=$1&product=$2 [L,NC]
http://www.gerronmulder.com/common-seo-rewrite-rules-for-apache-using-htaccess/