如何通过htaccess的从网址隐藏的index.php [英] How to hide index.php from Url by htaccess

查看:186
本文介绍了如何通过htaccess的从网址隐藏的index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于code点火器和MySQL:
如何通过htaccess的隐藏的网址的index.php?

With respect to Code Igniter And MySql:
How to hide index.php from Url by htaccess?

推荐答案

查看 codeIgniter手册

在您的文档根目录,包含以下内容的的.htaccess 文件:

In your document root, a .htaccess file containing the following:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt) # these are examples,
                                                 # add everything here that
                                                 # you **don't** want to be
                                                 # routed to CI
RewriteRule ^(.*)$ /index.php/$1 [L]

然后在的application / config / config.php文件的变化:

$config['index_page'] = '';

这篇关于如何通过htaccess的从网址隐藏的index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆