.htaccess:RewriteBase 接受一个参数,每个目录上下文的基础 URL
.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
由于 .htaccess,我收到内部服务器错误。
我的代码如下
RewriteEngine on
RewriteBase /
# Prevent CI index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/[=11=] [PT,L]
# Prevent user access to the CI system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/ [L]
# Prevent user access to the CI application folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/ [L]
和error_log文件显示]
/home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:43:58.213270 2015] [core:alert] [pid 642720] [client 122.177.194.19:60610] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:39:28.780669 2015] [core:alert] [pid 583314] [client 122.177.194.19:57750] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:39:28.780603 2015] [core:alert] [pid 583314] [client 122.177.194.19:57750] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
/home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one
argument, the base URL of the per-directory context
查看日志,您的 htaccess 似乎位于 billing
子文件夹中。
那么您的 RewriteBase
应该是 /billing/
。
此外,REQUEST_URI
以斜杠开头 /
。
这是您的 htaccess
的更正版本
RewriteEngine on
RewriteBase /billing/
RewriteCond %{REQUEST_URI} ^/(?:system|application) [NC]
RewriteRule ^(.*)$ index.php?/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]
由于 .htaccess,我收到内部服务器错误。
我的代码如下
RewriteEngine on
RewriteBase /
# Prevent CI index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/[=11=] [PT,L]
# Prevent user access to the CI system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/ [L]
# Prevent user access to the CI application folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/ [L]
和error_log文件显示]
/home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:43:58.213270 2015] [core:alert] [pid 642720] [client 122.177.194.19:60610] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:39:28.780669 2015] [core:alert] [pid 583314] [client 122.177.194.19:57750] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Jan 06 14:39:28.780603 2015] [core:alert] [pid 583314] [client 122.177.194.19:57750] /home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
/home/adonwayc/public_html/billing/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
查看日志,您的 htaccess 似乎位于 billing
子文件夹中。
那么您的 RewriteBase
应该是 /billing/
。
此外,REQUEST_URI
以斜杠开头 /
。
这是您的 htaccess
RewriteEngine on
RewriteBase /billing/
RewriteCond %{REQUEST_URI} ^/(?:system|application) [NC]
RewriteRule ^(.*)$ index.php?/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]