如何正确重定向到子文件夹

时间:2019-03-06 18:58:34

标签: .htaccess http-status-code-301

首先这会影响SEO排名吗?

这是我所使用的,但是我得到了一个基于tihs网站的循环

https://httpstatus.io/

这是htaccess代码...写得正确吗?

# Use PHP56 Single php.ini as default
AddHandler application/x-httpd-php56s .php
# Changed PHP handler from application/x-httpd-php54s to application/x-httpd-phpbetas on Mon Jan 11 12:15:36 MST 2016.

# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymlinks
Options +SymLinksIfOwnerMatch
RewriteEngine on
rewritecond %{http_host} ^badbreathhalitosis.com [nc]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
rewriterule ^(.*)$ http://www.badbreathhalitosis.com/$1 [r=301,nc]

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$


RewriteRule (.*) https://www.badbreathhalitosis.com/phpBB2/ [R=301,L]

我也希望它仅使用www重定向到https

0 个答案:

没有答案