Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorMKayHavoc
    • CommentTimeMar 23rd 2007
     permalink
    I'm trying to write an .htaccess file to do this for example:

    http://www.havocinspired.co.uk/services/

    Instead of:

    http://www.havocinspired.co.uk/services.php

    And I can't get the dame thing to work.

    On my hosting, my .htaccess file is in the route and my website is in a folder called:

    www.havocinspired.co.uk

    What I've got so far is:

    RewriteEngine On
    Options +FollowSymLinks
    RewriteBase /www\.havocinspired\.co\.uk
    RewriteRule ^([a-z0-9]+)$ /$1/ [R]

    RewriteRule ^home$ index.php
    RewriteRule ^portfolio$ portfolio.php
    RewriteRule ^contact$ contact.php
    RewriteRule ^about$ about.php
    RewriteRule ^services$ services.php

    And help on getting this working would be great.
    • CommentAuthordcrean
    • CommentTimeMar 23rd 2007
     permalink
    RewriteRule ^([a-z0-9]+)$ /$1/ [R]

    I don't think you need that. Or you might want to try moving it to the bottom, so that other conditions will override it. I believe that's hijacking your other rules before they get a chance to be evaluated.
    • CommentAuthorMKayHavoc
    • CommentTimeMar 23rd 2007
     permalink
    Removed it and tested. Still no joy. :-(
  1.  permalink
    Try this!

    RewriteEngine On
    RewriteRule ^services/$ /services.php [L]

    Best, DS
  2.  permalink
    Try these in order, if you get it working, stop before trying later changes:

    1. Your first rewrite rule will execute and mask the later ones. Try moving that one down to the bottom.
    2. You may have to add starting/trailing slashes to the specific rules.
    e.g. RewriteRule ^/home$ /index.php
    • CommentAuthorMKayHavoc
    • CommentTimeMar 23rd 2007
     permalink
    Tried and no joy. :-(
  3.  permalink
    What version of Apache you running?
    Can I see you .htaccess file?

    Best, DS
Add your comments
    Username Password
  • Format comments as (Help)