Answers for "htaccess page redirect"

1

htaccess redirect to html page

RedirectMatch 301 ^/blog/about /blog/about.html
Posted by: Guest on December-03-2020
1

.htaccess redirect

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$

RewriteRule $ /maintenance.html [R=302,L]
Posted by: Guest on August-11-2021
1

https and www htaccess redirecr

RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on July-14-2020

Code answers related to "htaccess page redirect"

Browse Popular Code Answers by Language