小编Ste*_*sen的帖子

如何在Apache Server中设置CodeIgniter .htaccess文件

我在Windows 7操作系统上安装了Apache 2.2,Php 5.4.5和Mysql 5.5.27.我的localhost位置是G:/ local_server.我已下载CodeIgniter_2.1.3并解压缩到local_server并重命名CodeIgniter.我在CodeIgniter文件夹上创建.htaccess文件并通过以下代码:

<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 / CodeIgniter/

# 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] …
Run Code Online (Sandbox Code Playgroud)

php apache codeigniter

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

apache ×1

codeigniter ×1

php ×1