Forum Moderators: phranque
This is my current htaccess
I would like to add another url friendly section to my site seperate from the main section
What I want is for if the url is
mydomain.com/* to redirect to index.php?sect=$1
mydomain.com/*/* to redirect to index.php?sect=$1&cat=$2
but if it's mydomain.com/bob index.php?sect=bob
and mydomain.com/bob/* to redirect to index.php?sect=$1&othercat=$2
so bascially Every secion will rewrite to either:
'index.php?sect=$1', 'index.php?sect=$1&cat=$2' or 'index.php?sect=$1&cat=$2&page=$3'
Unless Sect = Bob in which case I want:
'index.php?sect=$1', 'index.php?sect=$1&cat=$2' or index.php?sect=$1&othercat=$2&otherpage=$3
Also, Does anyone have a good Regex tutorial? I've been able to get the basics from what I've found but I'm still a bit confused (especially when it comes to matching things)