设置httpd.conf/mod_rewrite重定向到codeigniter吗? [英] Setting up httpd.conf / mod_rewrite to redirect to codeigniter?

查看:63
本文介绍了设置httpd.conf/mod_rewrite重定向到codeigniter吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉在这里问这个问题,因为我确定解决方案相当简单,但是在我的生命中,我无法在localhost apache服务器上设置httpd.conf来自动加载codeigniter文件.

I'm sorry to ask this here, as I'm sure the solution is fairly easy but for the life of my I can't setup httpd.conf on my localhost apache server to automatically load the codeigniter files.

相反,我必须进入文件夹本身localhost/trunk/etc/etc,直到获得index.php-弄乱了一些相对路径(我们的后端编码器已经用了一周了,所以我不能问他,但是他已经在我们的开发服务器上设置了重写规则).

Instead I'm having to go into the folder itself localhost/trunk/etc/etc until I get index.php - which messes with some of the relative paths (our backend coder is gone for the week so I can't ask him, but he has already setup the rewrite rules on our development server).

有人可以告诉我如何在我的本地环境上设置httpd.conf和mod_rewrite,因此转到 http://localhost 可以直接进入codeigniter的index.php?

Can someone tell me how to setup httpd.conf and mod_rewrite on my local environment so going to http://localhost goes straight into codeigniter's index.php?

推荐答案

如果您想弄乱httpd.conf,请查找文档根目录"行:

If you want to mess with httpd.conf, look for the Document Root line:

DocumentRoot"/path/to/CI/folder"

DocumentRoot "/path/to/CI/folder"

保存它,然后重新启动apache.

save it, and restart apache.

如果您打算更改httpd.conf,请首先进行备份.我搞砸了许多安装程序,改变了一切,很遗憾没有先备份文件:)

If you plan on changing httpd.conf MAKE A BACKUP OF IT FIRST. I've messed up many installs changing things around and regretted not backing up the file first :)

在更改httpd.conf后,您需要使用路径信息等来调整CI conf设置.

And you'll need to adjust the CI conf settings with path info etc. after changing httpd.conf

这篇关于设置httpd.conf/mod_rewrite重定向到codeigniter吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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