I've tried searching the forums, but just cant seem to get this to work I want to rewrite url's like this: http://www.whatever.com/historical_pts.php?year=2006&position=4&week=2 Code (markup): to this: http://www.whatever.com/historical_pts/year/2006/position/4/week/2 Code (markup): Note: the week variable is optional, so I have to take that into acct. Any help would be appreciated! Thanks
If you havn't seen it yet, check the sticky thread! Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^historical_pts/year/([^.]+)/position/([^.]+)/week/([^.]+)$ historical_pts.php?year=$1&position=$2&week=$3 [L]
Thanks, Nintendo...I'll check it out. One more question. As for the [L]. I'm assuming that means the last line, correct? I have other rewrites within the same htaccess, so does the [L] go at the very end...or should it appear after each rewrite?
# 'last|L' (last rule) Stop the rewriting process here and don't apply any more rewriting rules. This corresponds to the Perl last command or the break command from the C language. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. For example, use it to rewrite the root-path URL ('/') to a real one, e.g., '/e/www/'. # 'next|N' (next round) Apache site has them on each of them.
Thanks again, Nintendo. I got it working...now I have to go back and change the way my other links are displaying...other than that it's perfect!