View Single Post
10-16-2006, 04:28 PM
#3
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old

it used to read
Code:
RewriteEngine on
RewriteRule !\.(gif|jpg|png|css)$ /test/index.php
however, i did some more poking around today and i found the mod_rewrite cheat sheet. after some dissection, i was able to get the rewrite working properly on both localhost and the shared web server.

the new code looks like this:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test/index.php

# domain.com/section/page/etc to domain.com/index.php?sec=section&page=page&etc=etc
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?sec=$1&page=$2&etc=$3 [L]

</IfModule>
i'm still not sure why the first snip would create an infinate loop. if i read it correctly, it was redirecting all requests inside the test folder to infex.php unless they ended in those specific extensions.