View Single Post
  #7   Spotlight this post!  
Unread 20-03-2004, 00:00
jhnphm jhnphm is offline
Registered User
#0614
Team Role: Programmer
 
Join Date: Mar 2004
Rookie Year: 2003
Location: Fairfax, VA
Posts: 23
jhnphm is an unknown quantity at this point
Re: CSS Based Design

This guide assumes knowledge of regular expressions.
IThe mod_rewrites on my local copy of the site (out of date by two months, and I stripped out redundant statements that weren't needed because of the usage of the <base> element) and commented are:


Code:
 #Syntax is "RewriteRule [URL RegExp] [Replacement with optional back references [[Flags]]"

 RewriteRule ^/$ /robotics/ [R,L]
 #Redirects http://localhost/ to http://localhost/robotics
 #R flag redirects, L prevents fall through to statements below

 RewriteRule ^/robotics/pages/(.+)$ /robotics/index.php?file=pages/$1.inc [L]
#Using W3 recommended URIs, which makes it more difficult to rewrite URIs, since there is the problem of what to rewrite to. This has been solved by dumping all pages under the /robotics/pages directory, and use the <base> element to shift the initial path for relative URIs to just /robotics/ . All the "pages" are files with the .inc extension which are included into PHP. The scripts filter for the .inc extension for security purposes.