htaccess的配置IIS6上与投资者关系联合会工作 - codeigniter [英] Configure htaccess to work with IIRF on IIS6 - codeigniter

查看:183
本文介绍了htaccess的配置IIS6上与投资者关系联合会工作 - codeigniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了codeIgniter一个网站,这个问题是与我们的服务器与IIS6的Windows Server 2003上运行,

调用只显示网页的网站的时候,另一个页面显示404错误页面,由于为.htaccess限制在IIS6,

支持告诉我,他做了一个名为投资者关系联合会,使moderewrite但我仍然需要使用其他重写EX pression程序设置的一次是在htaccess的

这是我的htaccess的含量

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteBase /根/

#Removes用户访问到系统文件夹。
#Additionally这将允许您创建一个System.php控制器,
#previously这将是不可能。
#'系统'可以,如果你已重命名系统文件夹进行更换。
的RewriteCond%{REQUEST_URI} ^ MVC / core_business。*
重写规则^(。*)$ /index.php?/$1 [L]

#当你的应用程序文件夹没有在系统文件夹
#这个片断prevents用户到应用程序文件夹的访问
Fabdrol:由#Submitted
#Rename'应用'为您的应用程序文件夹名称。
的RewriteCond%{REQUEST_URI} ^ MVC。*
重写规则^(。*)$ /index.php?/$1 [L]

#Checks,查看是否用户正在试图访问一个有效的文件,
#such作为图像或CSS文档,如果这不是它发送的真实
#request的index.php
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php?/ $ 1 [L]
 < / IfModule>

 <!IfModule mod_rewrite.c>
   #如果我们没有mod_rewrite的安装,所有404的
   #可以被发送到index.php,一切工作正常。
   #提交者:ElliotHaughin
   的ErrorDocument 404的index.php
 < / IfModule>
 

解决方案

在IIRF.ini将这个:

  RewriteEngine叙述上
的RewriteBase

#Removes用户访问到系统文件夹。
#Additionally这将允许您创建一个System.php控制器,
#previously这将是不可能。
#'系统'可以,如果你已重命名系统文件夹进行更换。
的RewriteCond%{REQUEST_URI} ^ MVC / core_business。*
重写规则^(。*)$ /index.php?/$1 [L]

#当你的应用程序文件夹没有在系统文件夹
#这个片断prevents用户到应用程序文件夹的访问
Fabdrol:由#Submitted
#Rename'应用'为您的应用程序文件夹名称。
的RewriteCond%{REQUEST_URI} ^ MVC。*
重写规则^(。*)$ /index.php?/$1 [L]

#Checks,查看是否用户正在试图访问一个有效的文件,
#such作为图像或CSS文档,如果这不是它发送的真实
#request的index.php
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php?/ $ 1 [L]
 

i just created a website with CodeIgniter, the problem was with our server that running on windows server 2003 with IIS6,

when calling the website it displays only the homepage, and the other pages displays 404 error page due to .htaccess limitation on IIS6,

the support told me that he did a setup for a program called IIRF to enable moderewrite but still i need to use another rewrite expression that the one was in the htaccess

here is my htaccess content

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /root/

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^mvc/core_business.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^mvc.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#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 ^(.*)$ index.php?/$1 [L]
 </IfModule>

 <IfModule !mod_rewrite.c>
   # If we don't have mod_rewrite installed, all 404's
   # can be sent to index.php, and everything works as normal.
   # Submitted by: ElliotHaughin
   ErrorDocument 404 /index.php
 </IfModule> 

解决方案

Put this in IIRF.ini :

RewriteEngine On
RewriteBase 

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^mvc/core_business.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^mvc.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#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 ^(.*)$ index.php?/$1 [L]

这篇关于htaccess的配置IIS6上与投资者关系联合会工作 - codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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