Help with .htaccess rewrite

Discussion in 'Apache' started by sojic, Mar 29, 2008.

  1. #1
    I have this kind of links

    domain.com/language/
    domain.com/language/news/
    domain.com/language/news/category/
    domain.com/language/news/category/123-title.html
    domain.com/language/tv-schedule/
    domain.com/language/tv-schedule/date/
    domain.com/language/page.html
    Code (markup):
    and I want to "rewrite" to


    domain.com/index.php?language=[B]language[/B]
    domain.com/index.php?language=[B]language[/B]&page=[B]news[/B]
    domain.com/index.php?language=[B]language[/B]&page=[B]news[/B]&category=[B]category[/B]
    domain.com/index.php?language=[B]language[/B]&page=[B]news[/B]&category=[B]category[/B]&story=123
    domain.com/index.php?language=[B]language[/B]&page=tv-schedule
    domain.com/index.php?language=[B]language[/B]&page=[B]tv-schedule[/B]%date=[B]date[/B]
    domain.com/index.php?language=[B]language[/B]&action=static&page=[B]page[/B]
    Code (markup):

    I know to make simple .htaccess (it works) with different number of params, but... I have:

    domain.com/language/news/
    domain.com/language/tv-schedule/

    domain.com/language/news/category/
    domain.com/language/tv-schedule/date/

    So I do not know how to handle with this.
     
    sojic, Mar 29, 2008 IP
  2. sojic

    sojic Active Member

    Messages:
    133
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #2
    Anybody to help?
     
    sojic, Mar 30, 2008 IP
  3. sojic

    sojic Active Member

    Messages:
    133
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #3
    I have another problem

    I want to "rewrite" but also I want to "skip" rewrite rule if file exists.

    So.... I have

    Virtual: domain.com/language/page.html
    Real: domain.com/player/live.html

    How to "skip" rewrite rule for second case?
     
    sojic, Apr 4, 2008 IP