Bit of HTACCESS trouble

Discussion in 'HTML & Website Design' started by Tomp, Dec 11, 2010.

  1. #1
    Hey everyone.
    Soo im working on a little project and im having a bit of trouble with htaccess.

    Here is what i have:

    RewriteEngine on

    RewriteRule ^404/?$ / [R,QSA]

    RewriteRule ^(index.php|css|images|js) - [L]

    RewriteRule ^([^/]+)/([^/]+)$ view_location.php?location=$1&type=$2 [QSA]
    RewriteRule ^([^/]+)/?$ view_location.php?location=$1 [QSA]

    The locations work exactly how i want them too

    i am able to visit domain/$location or domain/$location/$type to get to the correct pages

    But i need to be able to set up things like

    /about /contact and various other things like /messages/$id around this that take priority over the above so that they don't redirect to the view location page

    I've tried exceptions and tried adding other rules before it, but whatever i do i always seem to end up at the view_location.php page.

    Any help appricaited
     
    Last edited: Dec 11, 2010
    Tomp, Dec 11, 2010 IP