Codeigniter.htaccess无法写入 #检查用户是否试图访问有效文件, #例如图像或css文档,如果这不是真的,它会发送 #请求index.php 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则^(.*)$main.php/$1[L]
这是我的.htaccess,但我没有得到正确的链接 每当我点击一个没有index.php的链接时,它就会重定向到wamp服务器主页Codeigniter.htaccess无法写入 #检查用户是否试图访问有效文件, #例如图像或css文档,如果这不是真的,它会发送 #请求index.php 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则^(.*)$main.php/$1[L],.htaccess,codeigniter,url,.htaccess,Codeigniter,Url,这是我的.htaccess,但我没有得到正确的链接 每当我点击一个没有index.php的链接时,它就会重定向到wamp服务器主页 <IfModule mod_rewrite.c> # 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.
<IfModule mod_rewrite.c>
# 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
RewriteRule ^(.*)$ main.php/$1 [L]
</IfModule>
你必须解释你的问题比那更好。发生了什么事?什么事情没有发生,你会预料到的?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^sys.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^app.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
$config['index_page'] = '';