apache重定向301

<VirtualHost *:88>
DocumentRoot /www/web/dir/dir/public_html
ServerName domain.com
ServerAlias www.domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ https://www.domain.com$1 [R=301,L]
ErrorDocument 400 /errpage/400.html
ErrorDocument 403 /errpage/403.html
ErrorDocument 404 /errpage/404.html
ErrorDocument 503 /errpage/503.html
</VirtualHost>
<Directory /www/web/dir/dir>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
Last modification:June 21st, 2019 at 10:10 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment