我有一个在根文件夹上运行的codeigniter项目。在名为ems2的文件夹上的同一服务器中,另一个项目正在运行。但由于codeigniter项目的根.htaccess,ems2项目无法正常工作。如何从ems2文件夹中删除.htaccess控件?
root上的.htaccess文件有以下代码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^codeigniter.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^uz\-mi.*
RewriteRule ^(.*)$ /index.php/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|css|style|uploads|js|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
RewriteCond %{HTTP_HOST} ^encg\.ae$ [OR]
RewriteCond %{HTTP_HOST} ^www\.encg\.ae$
RewriteRule ^/?$ "http\:\/\/www\.abc\.com\/encg" [R=301,L]
RewriteCond %{HTTP_HOST} ^ncg\.ae$ [OR]
RewriteCond %{HTTP_HOST} ^www\.ncg\.ae$
RewriteRule ^/?$ "http\:\/\/www\.abc\.com\/encg" [R=301,L]
答案 0 :(得分:0)
您可以使用“NOP”内容将新的简单.htaccess
文件添加到ems2项目文件夹,以停止处理父文件夹中的.htaccess
。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
</IfModule>