Removing index.php in IIS (Step-by-Step Guide)
Posted: 02 December 2008 02:18 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  11
Joined  08-22-2008

Removing index.php in IIS

The main idea of removing index.php is to have user and search-engine friendly URLs.

For example,

http://studioamk.com/index.php?/contact/


to

http://studioamk.com/contact/

In order to complete this task, we need to perform the following two steps;
First step is installation and setup of URL Rewriting Engine in IIS and
Second, making a change in EE configuration.


Rewrite Engine Configuration

For URL rewriting engine setup in IIS, please go to this tutorial (URL Rewriting In IIS)
After setup, we need to modify configuration file of the rewrite engine.
Please copy and paste it in the rewrite engine config file. (Special Thanks to bcartier)

#Change the following to your renamed system folder path:
RewriteRule ^/system/(.*)$ /system/$1 [I,L]

#Add rules for folders you want to accept without rewriting:
RewriteRule ^/images/(.*)$ /images/$1 [I,L]
RewriteRule
^/themes/(.*)$ /themes/$1 [I,L]

#This allows query string to be added to the url (like {path=logout} )
RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]

#This removes index.php? from the urls
RewriteRule ^/(.*)$ /index.php?/$1 [I,L]

EE Configuration

Now login to Admin Control Panel of the site and
Go to Admin > System Preferences > General Configuration.

“Name of your site’s index page textbox” must be blank. Clear it if it’s not blank.

That’s it…! =)

Image Attachments
2008-12-02_1612.png
Click thumbnail to see full-size image
Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66391 Total Logged-in Users: 51
Total Topics: 84716 Total Anonymous Users: 17
Total Replies: 454696 Total Guests: 192
Total Posts: 539412    
Members ( View Memberlist )