Welcome Guest, Not a member yet? Register   Sign In
removing index.php (docs are kinda sucky for this)
#11

[eluser]JulianM[/eluser]
Hi,
I think you forget to put the 's' in Options.

Options Indexes FollowSymLinks
AllowOverride All

Julian
#12

[eluser]SitesByJoe[/eluser]
Just so you know, everyone here keeps posting how to use the .htaccess file (which is great!) but you all overlooked the fact that the site is not on Apache. It's on IIS which does not support url rewriting without some pretty wild things being done to it - you won't find a shared environment running it - thats for sure.

For the image paths, use your base_url() and make sure that you haven't removed the setting for "index.php" from your config.php file (setting up .htaccess would have you remove it.)

Then it would be:

Code:
<img src="&lt;?=base_url()?&gt;/images/etc/etc" alt="my image">

Or as mentioned above (which is what I do as well):

Code:
<img src="/images/etc/etc" alt="my image">
#13

[eluser]Colin Williams[/eluser]
Good point, Joe. But all he said was "Windows server." Apache is a server that runs on Windows. I think at this point it is near obvious that he is not running Apache, but I guess we can't just go on assuming Smile
#14

[eluser]SitesByJoe[/eluser]
Oops, forgot about Apache on Windows...Have a win2k box running IIS right next to me.
#15

[eluser]Derek Allard[/eluser]
And this highlights why the docs are "kinda sucky" on this front. There is nothing, absolutely nothing, that CI can do to facilitate a server re-writing URLs. I suppose someone could write (and I think maybe has) a convoluted script that detects server software, version, and capabilities, but I've even seen servers mis-report this "for security reasons", so at the end of the day, the only real solution is to try htaccess if you're on Apache, and if that doesn't work, contact your host and say "hey, can you all give me a hand with this please" Wink
#16

[eluser]SitesByJoe[/eluser]
Personally I don't that it is CI's responsibility to adapt to its server environment. If the worst case scenario is leaving in the index.php, who cares? You still get clean urls thanks to the segmenting. Not much of a sacrifice really.

Its a whole hell of alot better than "index.php?controller=my_controller&etc;=&etc;="
#17

[eluser]Vanilla Junior[/eluser]
Here are the steps to remove the index.php on a Windows 2003 Server.

1. Install ISAPI_Rewrite 3 (http://www.helicontech.com/isapi_rewrite/). Freeware version available.
2. Restart IIS.
3. Open the Application Server \ IIS Manager.
4. Expand your IIS server so that the following subfolders are present.
Code:
+ Application Pools
+ Web Sites
+ Web Services Extensions
5. Right-Click on the Web Sites subfolder and select Properties.
6. Click on the ISAPI_Rewrite tab and click Edit.
7. Paste the following code in the dialog box (Helicon Config Editor).

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

8. Click Apply.
9. Click OK to close the Web Sites Properties dialog box.
10. Enjoy.
#18

[eluser]dmiden[/eluser]
IIS 7 has a plugin called, URL Rewrite module.
#19

[eluser]manilodisan[/eluser]
After selling 1 script based on CI I can surely tell this is the main reason why I feel bad for picking it. There's absolutely no way to fix my software in order to perform the same on all servers with or without index.php in the url. I have to write intensive documentations to support my script and show people how to do advanced stuff based on their servers and hosting providers when my script was supposed to install and work without a problem.

And again, I'm still with CI for all the other good things...




Theme © iAndrew 2016 - Forum software by © MyBB