Treehouse: Grow your CSS skills. Land your dream job.

Soo close

  • # December 20, 2009 at 8:23 pm

    Can someone please finish this off for me its soo close but i have been working on it all day and i can’t get it to work.
    This is the code i have so far.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^ [NC]
    RewriteRule ^(.*)$$1 [L,R=301]

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

    It’s inside a .htaccess file.

    The first 3 lines are fine – they change the url and force it to be in this format, http://www.mysite
    Its the other lines that wont work, someone will enter this as the url, and i want the .htaccess file to redirect the browser to the hompage. I’m pretty sure i have tried everything! At the moment with this code the browser is redirected to an error page, you can try it here,

    I have no idea what to do.
    Please Help
    Many Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.