繁体   English   中英

从Wordpress htaccess中排除目录

[英]Excluding a directory from wordpress htaccess

我在根目录中安装了WordPress,并使用htaccess将域名直接指向它。 我在根目录中也有一个CodeIgniter应用程序。 在根文件夹(public_html)中有两个htaccess文件,另一个在WordPress目录中。

我似乎无法使CodeIgniter可以访问。 请帮忙。

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

htaccess在WordPress的目录

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /rainoilcom/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


RewriteRule . /rainoilcom/index.php [L]
</IfModule>

# END WordPress

htaccess在codeigniter目录中

SetEnv TZ Africa/Lagos

<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On

# If your website begins from a folder e.g localhost/my_project then 
# you have to change it to: RewriteBase /my_project/
# If your site begins from the root e.g. example.local/ then
# let it as it is
RewriteBase /recruitment/

# Protect application and system files from being viewed when the index.php is missing
RewriteCond $1 ^(application|system|private|logs)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images|uploads|media|swf\.swf)

# No rewriting
RewriteRule ^(.*)$ - [PT,L]

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>

我找到了令人讨厌的代码。 SetEnv TZ非洲/拉各斯 ”。 删除了,我很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM