modrewrite rule for urls, need some help

Discussion in 'Apache' started by s.jns, Jul 11, 2010.

  1. #1
    I wondering if some one help me, and great thanks,

    my .htaccess file

    RewriteEngine On
    RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?category=$1&pic=$2 [L]

    so my url from:

    index.php?category=Public+Spaces%2FApartement&pic=CAPITAL-APARTEMENT4

    shorted to look like:

    Public+Spaces%2FApartement/CAPITAL-APARTEMENT4.html

    but it not solved at all, e.g.

    UPPERCASE to lowercase
    + to -
    %2F to &

    any another idea would be appreciate.

    Regards,
     
    s.jns, Jul 11, 2010 IP
  2. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Try this:
    
    RewriteRule ^([a-z0-9\-]*)/([a-z0-9\-]*)\.html$ /index.php?category=$1&pic=$2 [L]
    
    Code (markup):
     
    nimonogi, Jul 17, 2010 IP