A tricky set of rules for mode_rewrite

Discussion in 'Apache' started by mavsic, Jul 25, 2010.

  1. #1
    Hey, guys! I'm a newby developer from Russia.

    I need some help with mod_rewrite rules as i guess i can't handle it myself. I need the following set of rules:

    • For all directories - add / (slash) to the end if there is no one
    • For directories with page.txt file inside - rewrite them to index.php/url=<directory>
    • For directories without page.txt - rewrite them to site/<directory>
    • For all files - rewrite them to site/<file>

    I understand that it's not so easy and i may be aking for too much. But i'll be extremely grateful for everyone who will help.

    P.S. I'm sorry for my poor English...
     
    mavsic, Jul 25, 2010 IP