new site nit

Dan Kegel dank at kegel.com
Thu Mar 27 11:32:18 CST 2003


David Fraser wrote:
>>>> It would be nice if the site recognized normal URLs without
>>>> the ?page= prefix.
>>
>> I've added more redirects to the site in the .htaccess file. The
>> Following URLs work.
>>
>> http://docs.winehq.org
>> http://faq.winehq.org
>> http://www.winehq.org/download/
>>  ...
>
> That's great, but surely hardly anyone will end up using these unless 
> the links from the main page point to these URLs rather than the ?page= 
> ones?

Indeed.  What we need is to set up the php script as the handler
for *all* urls under the root (there's some syntax for that),
and then grab the URL at the beginning of the php script
and use it to set the page, news, or whatever variable.
(If the URL is a page at the root, we'll set the page variable to
the local part of the URL; if the URL is a page in the 'news'
subdirectory, we set the 'news' variable instead, etc.
The php is a bit odd, it has the line 'switch(true) { ...',
and uses dynamic case labels.)

I can do the PHP but haven't bothered to learn the apache part
yet.
- Dan


-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045




More information about the wine-devel mailing list