Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    66
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Mod Rewrite Frustration

    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:

    Code:
    RewriteEngine on
    RewriteBase /rosie
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1  [L]
    I tried the following to no avail:

    Code:
    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
    Chris Holbrook
    Freelance Designer and Musician
    Freelance Web Designer and Musician: Bristol, UK
    Visit my site: http://www.chrisholbrook.com

  • #2
    New Coder
    Join Date
    Dec 2007
    Posts
    96
    Thanks
    8
    Thanked 1 Time in 1 Post
    Try this, I think this one is gonna work
    Code:
    RewriteCond %{THE_REQUEST} ^.*/index.php/app
    RewriteRule ^(.*)index.php/app$ http://YOURWEBSITE.com/$1 [R=301,L]
    Last edited by skmd; 04-13-2008 at 08:59 PM.

  • #3
    New Coder
    Join Date
    Mar 2006
    Posts
    66
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks skmd

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

    Code:
    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
    Chris Holbrook
    Freelance Designer and Musician
    Freelance Web Designer and Musician: Bristol, UK
    Visit my site: http://www.chrisholbrook.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •