HTaccess Question

Discussion in 'Apache' started by Gianni83, May 11, 2010.

  1. #1
    Hi,
    I set on my Apache Server a .htaccess file with the follow rules:

    RewriteRule ^(.*?)/$ pagina.php?param=$1 [L]

    so I can access from address :

    http://www.dominio.com/quellochevoglio/

    to

    http://www.dominio.com/pagina.php?param=quellochevoglio

    So, How can I do the same effect without the last slash char?
    I would like to redirect
    http://www.dominio.com/quellochevoglio in

    http://www.dominio.com/pagina.php?param=quellochevoglio

    How Rule Do i have to add?
    Thanks a lot
    Gianni
     
    Gianni83, May 11, 2010 IP
  2. AlexL

    AlexL Peon

    Messages:
    122
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    heya

    just remove slash in RewriteRule ^(.*?)$

    that what i do

    RewriteEngine on
    RewriteRule ^([A-Z]*)$ /index.php?username=$1

    but isn't work with numbers.
     
    AlexL, May 11, 2010 IP
  3. graspit

    graspit Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    graspit, May 11, 2010 IP
  4. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    chadsmith, May 11, 2010 IP