...

Mod Rewrite Frustration

latemodern
04-03-2008, 02:09 PM
Hi,

Sorry if it turns out that I'm being daft but some help would be much appreciated.

I am using codeigniter (a PHP Framework) and my application's URL is:

http://www.BASEURL.com/index.php/app/

I would like it to be:

http://www.BASEURL.com/

I have managed to remove the ;index.php' so that this works:

http://www.BASEURL.com/app/

But I would like to get rid of ''/app' too.

My .htaccess file:


RewriteEngine on
RewriteBase /rosie
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]


I tried the following to no avail:


RewriteEngine on
RewriteBase /rosie
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/app/$1 [L]


Any ideas what I'm doing wrong?

Thanks in advance!

Chris

skmd
04-13-2008, 08:52 PM
Try this, I think this one is gonna work
RewriteCond %{THE_REQUEST} ^.*/index.php/app
RewriteRule ^(.*)index.php/app$ http://YOURWEBSITE.com/$1 [R=301,L]

latemodern
04-14-2008, 09:52 PM
Thanks skmd

Didn't work though. Do I need these lines first?


RewriteEngine on
RewriteBase /


I'm using 1and1 web hosting and, despite their insistence to the contrary, I think rewriting is a bit hit and miss. can't think why though

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum