Change Drupal Theme Based On URL Path

Firstly, if you are not using SSL for all your sites, you should step it up! NameCheap's SSL certificates start at only $9. There's no excuse!
Firstly, if you have not tried Digital Ocean's SSD Virtual Servers for only $5/mo, I highly recommend them!

You could spend 9 years looking for a module to do it or you could do this. Put this in your settings.php

$THEME_URLS = array(
	array('/admin','garland'), # Drupal already support admin theme anywho
	array('/users','fancy_user_theme'),
	array('/forum','forums_theme'),
	);
foreach ( $THEME_URLS as $info)
	if ( strpos($_SERVER['REQUEST_URI'],$info[0])===0)
		$conf['theme_default'] = $info[1];

About this entry


Good Reads