Posts Tagged 'mod'

Rewrite rules for SMF Pretty URLs on Lighttpd

url.rewrite-once = (
	"^/(Themes|Smileys|avatars|Packages|awards|geshi|mathtex|pm_attachments)/(.*)?$" => "/$1/$2",

	# Rules for: profiles
	"^/profile/([^/]+)/(?:\?(.*))?$" => "/index.php?pretty;action=profile;user=$1;$2",

	# Rules for: actions
	"^/(activate|admin|ads|announce|attachapprove|buddy|calendar|clock)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(collapse|coppa|credits|deletemsg|display|dlattach|dlpmattach|editpoll)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(editpoll2|emailuser|findmember|groups|help|helpadmin|im|jseditor)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(jsmodify|jsoption|lock|lockvoting|login|login2|logout|markasread)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(mergetopics|mlist|moderate|modifycat|modifykarma|viewkarma|ownkarma|otherkarma)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(movetopic|movetopic2|notify|notifyboard|openidreturn|pm|post|post2)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(printpage|profile|quotefast|quickmod|quickmod2|recent|register|register2)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(reminder|removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(sendtopic|smstats|suggest|spellcheck|splittopics|stats|sticky|theme)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(topicattach|trackip|about:mozilla|about:unknown|unread|unreadreplies|verificationcode|viewprofile)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",
	"^/(vote|viewquery|viewsmfile|who|\.xml|xmlhttp)/(?:\?(.*))?$" => "/index.php?pretty;action=$1;$2",

	# Rules for: boards
	"^/([\-_!~\*\(\)$a-zA-Z0-9%\"']+)/(?:\?(.*))?$" => "/index.php?pretty;board=$1.0;$2",
	"^/([\-_!~\*\(\)$a-zA-Z0-9%\"']+)/([0-9]*)/(?:\?(.*))?$" => "/index.php?pretty;board=$1.$2;$3",

	# Rules for: topics
	"^/([\-_!~\*\(\)$a-zA-Z0-9%\"']+)/([\-_!~\*\(\)\$a-zA-Z0-9%\"']+)/(?:\?(.*))?$" => "/index.php?pretty;board=$1;topic=$2.0;$3",
	"^/([\-_!~\*\(\)$a-zA-Z0-9%\"']+)/([\-_!~\*\(\)\$a-zA-Z0-9%\"']+)/([0-9]*|msg[0-9]*|new)/(?:\?(.*))?$" => "/index.php?pretty;board=$1;topic=$2.$3;$4",
)

It’s all there but it’s partially hidden due to the small width of the blog — just copy it.