[theforum] evolt move

Matt Warden mwarden at gmail.com
Sun May 1 19:12:59 CDT 2005


> Further discussion on likely solution:
> http://lists.evolt.org/theforumarchive/Week-of-Mon-20050228/005547.html
> http://lists.evolt.org/theforumarchive/Week-of-Mon-20050228/005549.html
> http://lists.evolt.org/theforumarchive/Week-of-Mon-20050228/005551.html
> http://lists.evolt.org/theforumarchive/Week-of-Mon-20050228/005552.html
> 
> Cheers
> Martin


Sorry for the delay.  I'm not on this list and I only thought to check
the archives today. I think I've worked out the rewrite rules, but
someone may want to tighten them up. My knowledge of Droupal is
minimal, and I'm just going off of what was discussed in the emails
Martin referenced.

RewriteEngine On
# this is probably not needed, but meh
RewriteRule ^node/[0-9]$ - [L]
# handles format /article/title/categoryid/contentid(/index.html)
# or /article/rating/... or /article/foo/...
RewriteRule ^article/[^\\]+/[^\\]+/([0-9]+)/+.*$ /node/$1/ [L]
# this is to handle the /title format. search.php will use the alias 
# table. if this is built-in to droupal, change accordingly
RewriteRule ^([^\\]+)$ /search.php?q=$1 [QSA,L]


If the only chars allowed in the title portion are alphanumeric plus
underscore, then a better set might be:

RewriteEngine On
# this is probably not needed, but meh
RewriteRule ^node/[0-9]$ - [L]
# handles format /article/title/categoryid/contentid(/index.html)
# or /article/rating/... or /article/foo/...
RewriteRule article/[^a-zA-Z0-9_]+/[^\\]+/([0-9]+)/+.* /node/$1/ [L]
# this is to handle the /title format. search.php will use the alias 
# table. if this is built-in to droupal, change accordingly
RewriteRule ^([a-zA-Z0-9_]+)$ /search.php?q=$1 [QSA,L]


And, alternatively, we could also restrict the category ID section to
only numeric, if appropriate (althought I seem to recall that for
FAQs, it wasn't numeric -- not sure), by replacing the middle [^\\]+
with [0-9]+


-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the theforum mailing list