htaccess url problem

Discussion in 'Apache' started by cheasamnang, Jul 1, 2011.

  1. #1
    cheasamnang, Jul 1, 2011 IP
  2. MartinPrestovic

    MartinPrestovic Peon

    Messages:
    213
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your doing it the wrong way around to get that effect. Switch your rule so that the index.php portion is first and the /p/ portion comes second remembering to change the vars.
     
    MartinPrestovic, Jul 6, 2011 IP
  3. cheasamnang

    cheasamnang Member

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    Hi Martin,

    Could you send me a complete sample of using htaccess to make url friendly ?

    my email is chea_samnang06[at]yahoo[dot]com

    Thanks and wait your email :)
     
    cheasamnang, Jul 8, 2011 IP
  4. MartinPrestovic

    MartinPrestovic Peon

    Messages:
    213
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No sorry. I don't email off forum unless I am conducting business.

    Here is what I meant by switching it around:

    
    RewriteRule index.php?p=(.*)&job_id=(.*)  /p/$1/job_id/$2\.php
    
    Code (markup):
    It probably won't work out of the box, but play with it and try to get it working yourself. There are thousands of people asking these questions on this forum and there are a lot of samples around.
     
    MartinPrestovic, Jul 8, 2011 IP
  5. cheasamnang

    cheasamnang Member

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #5
    Thanks Martin :)
     
    cheasamnang, Jul 8, 2011 IP
  6. gpcola

    gpcola Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    http://htaccess.madewithlove.be/

    Try the above - to test your htaccess rewrite rules
     
    gpcola, Jul 24, 2011 IP