Some help with basic .htacces

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by medina, Mar 15, 2014.

  1. medina

    medina x10 Addict Community Support

    Messages:
    1,862
    Likes Received:
    6
    Trophy Points:
    38
    Hey everybody!Im trying to use the friendly URL on my website, and have some troubles with te htaccesI want to convert this www.alejandrom.com/index.php?id=contacto to this www.alejandrom.com/contactoIm using this :
    RewriteEngine On
    RewriteRule ^([^/d]+)/?$ index.php?id=$1 [QSA]


    but doesn't work, and also can convert de index.php?id=contacto to just ?id=contacto but is not the think that i want..Obviously i dont want to do this with one page, i mean want to convert index?id=ANYPAGE to alejandrom/ANYPAGE Sorry for my bad English.
     
  2. tanwirec

    tanwirec Member

    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Hi,
    It had something to do with the script you are using. Try this code:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Hope that helped ^_^
     
    • Dislike Dislike x 1
  3. medina

    medina x10 Addict Community Support

    Messages:
    1,862
    Likes Received:
    6
    Trophy Points:
    38
    Thanks you you your fast reply!!..Still not working!...
     
  4. tanwirec

    tanwirec Member

    Messages:
    34
    Likes Received:
    1
    Trophy Points:
    8
    Hi,
    I recommend submitting a support ticket. If they don't help, someone with more .htaccess knowledge should help ;P
     
    • Dislike Dislike x 1
  5. leafypiggy

    leafypiggy Manager of Pens and Office Supplies Staff Member

    Messages:
    3,819
    Likes Received:
    162
    Trophy Points:
    63
    Last edited: Mar 15, 2014
    • Useful Useful x 1
  6. medina

    medina x10 Addict Community Support

    Messages:
    1,862
    Likes Received:
    6
    Trophy Points:
    38

Share This Page