簡體   English   中英

.htaccess控件從文件夾中刪除

[英].htaccess control remove from a folder

我有一個在根文件夾上運行的codeigniter項目。 在同一服務器上的ems2文件夾中,另一個項目正在運行。 但是由於codeigniter項目的根.htaccess,ems2項目無法正常工作。 如何從ems2文件夾中刪除.htaccess控件?

我在根目錄上的.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]

您可以將新的簡單的.htaccess文件添加到帶有“ NOP”內容的ems2項目文件夾中,以停止處理父文件夾中的.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
</IfModule>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM