Welcome Guest, Not a member yet? Register   Sign In
URL Rewrite for IIS, CI
#1

[eluser]abbe01[/eluser]
Hi,
I am having problems in accessing codeigniter which running from IIS.
As I googled all the solutions from CI forum, I found that is the url rewrite problem which is doesn't recognise in IIS. I hope somebody able to provide me some ideas for this url rewrite for CI. Here is my url http://localhost/codeignite/, but how my rewrite rule to be? I have install ionic isapi rewriter in order to let the route work. But, I tried a lots of rule, it just doesnt work. Below is my rewrite rule:
RewriteRule ^/(.*)codeignite/(.*) $1codeignite/index.php?/$2

I also try to modify the uri protocol to be "query string", it works fine. But, once i come to localhost/codeignite/scaffolding, I'm sorry that it doesnt work at all. I am wonder how the internal routes work. Can anybody provide me some ideas? Thanks.
#2

[eluser]easylancer[/eluser]
I have isapi_rewrite filter from Ionics installed on my server, i got mine to work with this rewrite rule
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Hope this works the same for you. But you will have to put the files in the root directory.
#3

[eluser]Fielder[/eluser]
where did you put this code... in an .htaccess or httpd.conf file? I got rid of my .htaccess file because I read that was only for Apache - so I made the httpd.conf file for IIS.
I'm running IIS, installed Ionics Mod_rewrite, read through tons of other peoples posts but am at my wits end still trying to get it to work.


- My httpd.conf file is
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|/assets|images|stylesheets|javascript)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [I,L]
</IfModule>
- CI config is $config['index_page'] = "";
- The httpd.conf file is in the same folder as index.php.
- I've installed Ionic Rewriter as an ISAPI Filter in IIS.
- I've installed isapirewrite4.dll and the .ini file in the windows/system32 folder.
- I've restarted IIS everytime I make any changes.
- I get 404 errors.
- I saw mentions of making sure allowoverride was set to fileinfo. Where is this for IIS?
- Is there somewhere I can look to see if i even have rewrite running on my IIS??? Nothing shows in phpinfo().

Anyone.. anyone, please help a desperate guy!!! Thx.




Theme © iAndrew 2016 - Forum software by © MyBB