【发布时间】:2017-07-07 23:14:46
【问题描述】:
我将 laravel 框架安装在 root 文件夹中,并将 wordpress CMS 安装在 Blog 文件夹中
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}]
我的网址:https://www.zanborasal.com
wordpress 博客文件夹:https://www.zanborasal.com/blog
您知道如何更正我的 Wordp=Press 安装吗?
【问题讨论】:
标签: php wordpress .htaccess laravel laravel-5