Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • have a little problem (In: Coding & Databases - PHP, ASP, Perl, etc.)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    Reflects user activity within the last 5 minutes
    Moderator(s): g1smd, Logan
    Member Message

    accelerate
    Joined: Mar 13, 2005
    # Posts: 17

    View the profile for accelerate Send accelerate a private message

    Posted: 2006-Feb-02 15:18
    Edit Message Delete Message Reply to this message

    I have a dynamic page like

    index.php?category=family-car&model=bmw&engine=2000&color=dark-gray

    i want to change this to

    family-car-bmw-2000-dark-blue.htm

    using reweite mode. But i can't handle it. I think i can't write right rule for this .i wrote something like below

    RewriteRule ^([0-9A-Za-z]+)-([0-9A-Za-z]+)-([0-9A-Za-z]+)-([0-9A-Za-z]+).html index.php?category=$1&model=$2&engine=$3&color=$4

    dark-gray and family-car 's (-) cause a problem i think. Any help would be greatly appreciated

    Thanks



    [ Message was edited by: accelerate 02/02/2006 07:34 am ]





    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10465

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Feb-02 15:53
    Edit Message Delete Message Reply to this message

    You are only letting A to Z and 0 to 9 in the original URL appear in the rewritten URL. You need to let it include the original hyphen too.

    I do think it is a very bad idea to include an Apostrophe in any URL. Additionally, make sure that you use only lower case for all URLs too (your rewrite rule makes it possible for upper case stuff to exist).


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions