Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,467
There are 1383 users currently browsing (tf).
  Our Partners:
  TalkFreelance     Design and Development     Programming     Other Programming Languages :

Merging these three rewrites? htaccess

Thread title: Merging these three rewrites? htaccess
    Thread tools Search this thread Display Modes  
06-20-2012, 05:44 PM
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Posts: 3,164
iTrader: 15 / 86%

Dan is an unknown quantity at this point

  Old  Merging these three rewrites? htaccess

RewriteRule ^forums$                   pages/forum.php [L]
RewriteRule ^forums/([A-z]+)$          pages/forum.php?category=$1 [L]
RewriteRule ^forums/([A-z]+)/([A-z]+)$ pages/forum.php?category=$1&sort=$2 [L]
Is it possible to merge these three lines into one? I use to be able to do this but it's been so long I've forgotten.

EDIT: RewriteRule ^forums(/([A-z]+)(/([A-z]+))?)?$ pages/forum.php?category=$2&sort=$4 [L]

Reply With Quote

Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed