Apache .htaccess在live server上无法正常工作

Apache .htaccess在live server上无法正常工作,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我正在尝试同时使用Laravel和Codeigniter,Laravel和Codeigniter都将位于public_html根目录的子文件夹中 我正在尝试设置.htaccess,以便访问example.com/events将重定向到Laravelevents/public目录 这是我的.htaccess文件,在public\u html中,没有其他.htaccess文件 # for laravel assets inside events/public/{types}/{files}.{ext

我正在尝试同时使用Laravel和Codeigniter,Laravel和Codeigniter都将位于public_html根目录的子文件夹中

我正在尝试设置.htaccess,以便访问
example.com/events
将重定向到Laravel
events/public
目录

这是我的.htaccess文件,在
public\u html
中,没有其他.htaccess文件

# for laravel assets inside events/public/{types}/{files}.{ext}
RewriteCond %{REQUEST_URI} (\.css|\.js|\.png|\.jpg|\.ttf|\.woff)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^events/(.*)$ events/public/$1 [L]

# for laravel controller actions
RewriteCond %{REQUEST_URI} events
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.ttf|\.woff)$ [NC]
RewriteRule ^events/(.*)$ events/public/index.php [L]

# for codeigniter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^assets(.*)$ mycommerce/assets$1 [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^themes(.*)$ mycommerce/themes$1 [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^sitemap/(.*\.xml)$ mycommerce/xmls/$1 [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule !^index.php|assets|xmls|themes.*$ index.php
CI one运行良好,仅在拉雷维尔发行。控制器动作工作正常,我可以看到我的控制器在工作,但是控制器视图引用的所有资产都显示为404404显示的是CI 404,而不是apache默认404或Laravel 404

示例URL为:
http://example.com/events/manage/events
http://example.com/events/js/app.js

任何帮助都将不胜感激,我从昨天就开始处理这个问题。上面.htaccess中的代码在我的本地机器上工作,但是live服务器似乎工作不正常


谢谢大家!

^events/(.*)$events/public/
看起来是可循环的。我想在regexp中尝试一个否定的前瞻:
^events/(?!public)(.*)$events/public/
谢谢您对@Deadooshka的评论,我尝试了您的建议,但仍然没有找到。注意错误是404,而不是500,通常是无限重定向。我在没有
(?!public)
的情况下用这两条规则得到了500。Apache 2.4.25。另外,
RewriteCond%{REQUEST_URI}事件
看起来毫无意义,因为所有这些事件都与通过
RewriteRule
传递的路径相匹配。此外,这
^events/(.*)$events/public/index.php
。如果接受子磁盘,则应将其作为参数/路径信息附加到脚本路径。否则,请删除
(.*)$