我已经在public_html中安装了wordpress(域http://example.com),我在public_html / laravel /目录中安装了laravel,当我尝试访问example.com/laravel时,我得到了laravel徽标,这意味着它工作正常,但是当我尝试访问example.com/laravel/test我得到wordpress 404,我注意到当我删除root(public_html)文件夹中的.htaccess文件夹laravel工作正常并返回一些视图
这是我的wordpress htaccess ...
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
答案 0 :(得分:0)
也许这会对你有所帮助:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/laravel/ #added for Laravel routing
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
在这里,只是说明,为了路由到Wordpress,必须满足以下三个要点:
答案 1 :(得分:0)
解决了! 添加&#34; / laravel /&#34;在Laravel .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /laravel/index.php [L]