Welcome Guest, Not a member yet? Register   Sign In
index.php mod_rewrite weirdness - SOLVED
#1

[eluser]Riley123[/eluser]
ok I had my codeigniter project working fine on my local apache server. Move everything over to the host and I run this problem.

This url works http://www.mysite.com/?services/

and this one works http://www.mysite.com/index.php?/services/

but http://www.mysite.com/services/ gives me a blank page.
http://www. mysite.com/index.php/services/ (no ?) gives me

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers.


This is my mod_rewrite:

<IfModule mod_rewrite.c>

# Turn on the Rewrite Engine
RewriteEngine On

# If the file or directory exists, show it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]

# Blank queries get sent to the index
RewriteRule ^$ index.php [L]

# All other queries get sent to the index as index.php/whatever
RewriteRule ^(.*)$ index.php/ $1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>


and in config I have

$config['index_page'] = "index.php?";

setting $config['index_page'] = ""; makes no difference.


Thanks in advance.
#2

[eluser]Riley123[/eluser]
Solved. The hosting company told me they have IIS mod_rewrite module but not on the machine that is hosting my site. Just need to wait for them to set me up on the IIS server with mod_rewrite module and my script should be all ok.

geez who uses IIS anymore!




Theme © iAndrew 2016 - Forum software by © MyBB