Welcome Guest, Not a member yet? Register   Sign In
Dreamhost .htaccess that works
#1

[eluser]skoots[/eluser]
After some frustration trying to get my site running on Dreamhost (shared) I finally hit upon a winner:

Code:
RewriteEngine On
RewriteCond $1 !^(index\.php|public|user_guide|robots\.txt|css|img|js)
#RewriteCond $1 !^(index\.php)
RewriteRule ^(.+)$ index.php?$1 [L]

I'm not very competent with .htaccess so this was mainly a brute trial and error effort.

My URI profile was set to AUTO:

Code:
$config['uri_protocol']    = "AUTO";

Hope this helps someone down the line!
#2

[eluser]Daniel Moore[/eluser]
I've seen
Code:
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

But I've never seen
Code:
RewriteRule ^(.+)$ index.php?$1 [L]

The main difference being the lack of the "/" in yours. (And the "nocase" and "query string append" modifiers.)

I'm curious to ask, without the slash the way you have it, are you able to correctly access different controllers/functions without a problem?

For example, does
Code:
http://www.example.com/controller/function/param1/param2
work correctly with your setup?
#3

[eluser]Cro_Crx[/eluser]
There's some info on the wiki here. http://codeigniter.com/wiki/Dreamhost_.htaccess/




Theme © iAndrew 2016 - Forum software by © MyBB