我在root 文件夹中安装了 laravel框架,在Blog文件夹中安装了 wordpress CMS
Laravel运作良好,但WordPress不起作用
我在laravel .htaccess
文件中将no-www重定向到www并将http重定向到https:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
mysite网址:https://www.zanborasal.com
wordpress博客文件夹:https://www.zanborasal.com/blog
您是否知道如何更正我的Wordp =按安装?
答案 0 :(得分:1)
在RewriteEngine On
之后添加:
RewriteCond $1 !^(wordpress-folder)
这将排除您的Wordpress安装,并让您在wordpress-folder
中拥有自己的htaccess设置。