There are a lot of tutorials and Code on removing index. php In the forum, but the tragedy is that you can configure your own server, and the server is either Apache or IIS6 -... There is no configuration in IIS7.5. I think there should be a lot of space provided by service providers, and some files cannot be modified. I once saw a quarrel in the group.
There are a lot of tutorials and Code on removing index. php In the forum, but the tragedy is that you can configure your own server, and the server is either Apache or IIS 6 -... There is no configuration in IIS7.5. I think there should be a lot of space provided by service providers, and some files cannot be modified. I once saw a quarrel in the group.
There are a lot of tutorials and Code on removing index. php from the Forum, but the tragedy is that you can configure the server on your own,
And the server is either Apache or IIS 6 -...
There is no configuration in IIS7.5.
I think there should be a lot of space provided by service providers, and some files cannot be modified.
One time I saw a person in the group clamoring for spam from the service provider and refused to modify the httpd. conf file,
What do you mean? I can change it to pseudo-static... I also say that the server is spam and does not support URL Rwrite.
In fact, IIS7.5 is supported, and the configuration level and flexibility are quite high,
As long as you know how to configure web. config rules, you can completely ignore the service provider. You know this...
What 404,500 etc. Filter files, restrict access and so on is not a problem.
From this point of view, many people will make such embarrassment because they do not understand Web. config and blindly worship the tutorials they see.
If you don't want to talk about it, go directly to the Code:
Web. config
XML
Input = "{HTTP_HOST}" pattern = "^ (. *) $"/>
Input = "{REQUEST_FILENAME}" matchType = "IsFile" negate = "true"/>
Input = "{REQUEST_FILENAME}" matchType = "IsDirectory" negate = "true"/>
Type = "Rewrite" url = "index. php/{R: 1}"/>
Value = "index. asp"/>
Value = "index. aspx"/>
Value = "index. php"/>
Value = "index.html"/>
Value = "Default.htm"/>
Value = "Default. asp"/>
Value = "index.htm"/>
Value = "Default. aspx"/>
Value = "index.shtml"/>
ResponseMode = "ExecuteURL"/>
If you only need to remove index. php, add the following code directly In the middle.
XML
Input = "{HTTP_HOST}" pattern = "^ (. *) $"/>
Input = "{REQUEST_FILENAME}" matchType = "IsFile" negate = "true"/>
Input = "{REQUEST_FILENAME}" matchType = "IsDirectory" negate = "true"/>
Type = "Rewrite" url = "index. php/{R: 1}"/>
Note that you must modify the config. php file of Codeigniter. The file is in the application/config directory by default.
The following content in this file:
PHP
// $ Config ['index _ page'] = "index. php"; Change "index. php" to "", as shown below:
$ Config ['index _ page'] = "";
Hope to help you with the shoes that want to remove "index. php" under IIS7.5... For details, refer:
IIS7.5 pseudo-static URL Rewrite Rules (Ci, codeigniter, eMlog, Discuz ...) Http://qfish.me/2011/05/iis7-5-url-rewrite.htmll