我正在使用codeigniter php框架。我正在尝试访问public_html下的文件夹,但无法访问它。它通过codeigniter显示404自定义页面。.htaccess中的以下脚本与此有关吗?
RewriteEngine on
RewriteCond $1 !^(index\.php|js|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
谢谢
可能是,您可以尝试添加一些条件:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|js|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
或将您的文件夹包括在排除范围内(例如,您的文件夹为“ foobar”):
RewriteEngine on
RewriteCond $1 !^(index\.php|js|images|robots\.txt|foobar)
RewriteRule ^(.*)$ /index.php/$1 [L]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句