#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Posts
    49
    Rep Power
    6

    Htaccess Question?


    Hi Everyone,

    I'm trying to figure out a way to add a / to my URLS.

    For example,
    The below URL is working
    http://whatsmyowncarworth.com/nevada

    The below URL does not work
    http://whatsmyowncarworth.com/nevada/

    My goal is to get have the / at the end of URL so it will work. Also, if someone types in the URL without any / I would want the URL to work as well.

    Below is my htaccess.
    Code:
    RewriteEngine On
    RewriteRule ^([_a-zA-Z_]+)$ state.php?state=$1 [L]
    RewriteRule ^([_a-zA-Z_]+)/([_a-zA-Z_]+)$ city.php?state=$1&city=$2 [L]
    
    ErrorDocument 404 /cool404.php
    How would I append the / to the end of the URL and have both URLS working?

    Thanks
  2. #2
  3. Known to taste like chicken
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    In front of my computer
    Posts
    399
    Rep Power
    312
    3 seconds on google and i have your answer....

    check out this page, looks like it is what you want
    "Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe

    Looking for a project Idea?

IMN logo majestic logo threadwatch logo seochat tools logo