[_] Any Apache PHP Wizards?
James Moverley
jmoverley at ladnet.org
Sat Jan 5 18:11:51 GMT 2008
dunno if it helps but : // --snip-- //RewriteEngine On //RewriteRule ^gallery/icon/(.*) /code-php/gallery.php?icon=$1 //RewriteRule ^gallery/thumb/(.*) /code-php/gallery.php?img=$1&op=thumb //RewriteRule ^gallery/browse/(.*) code-php/gallery.php?browse=$1 //RewriteRule ^gallery/(.*)/$ /code-php/gallery.php?dir=$1 //RewriteRule ^gallery/(.*)/page(.*)$ code-php/gallery.php?pg=$2&dir=$1 //RewriteRule ^gallery/$ /code-php/gallery.php?dir= //RewriteRule ^gallery/(.*) /code-php/gallery.php?img=$1 // --snip-- This goes in my .htaccess and is for my gallery script. i think its kinda self explanitory i've used plain (.*) for my regex, rather than ([a-Z][0-9]) thats up to you :) regardless.. this how I turned script params into some kinda http path structure. J. On 03/01/2008, Vincent Bray <noodlet at gmail.com> wrote: > > On 03/01/2008, Vincent Bray <noodlet at gmail.com> wrote: > > RewriteEngine On > > RewriteCond %{REQUEST_URI} !whatever.php > > RewriteRule ([^/]+) /whatever.php > > Something I forgot to add.. You can pass the original user name from > the request by sending ?user=$1 to whatever.php in the rule but > there's not really any point. Run phpinfo() and you'll see the > original request URL in the environment tables. > > -- > noodl > > -- > underscore_ list info/archive -> > http://www.under-score.org.uk/mailman/listinfo/underscore >