When I took over the Brickhouse website, we weren't particularly high, but now we're within top results for most cambridge theatre related searches!
How did it get done?
- The easiest method was to add the site onto Google Webmaster, using a GMail account... www.google.com/webmaster/tools
- Create a xml site map in the xml format. (will look something like this:
<?xml version="1.0" encoding="UTF-8"?>
). Yep it's a real pain to go through every page and add a
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.srcf.ucam.org/btc/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>subset for each individual page, but worth it.
The <priority> tag is purely relative to the site, not to priority of your site conpared to others... The homepage is obviously more important so it gets a 1.0 tag.
- Try and get links to your site from as many others as possible, provide links to them in return - friend's sites, other theatre sites, even as a signature in forums... that sort of thing.
- GoogleWebmaster lists how many searches are resulting in your website being shown in the results, and also what people searched for. Add all of these into the keywords tag and that increases the Google PageRank of your site, therefore lifting it higher!
[ 3 comments ] ( 12 views ) | permalink |




( 3 / 194 )I have this morning added ucam-webauth to the site, so is now fully Raven encoded (instead of the cheating workaround I was using before!).
The Raven feature is only for registering, viewable here
The following code needs to go into the .htaccess file to restrict the file itself:
.htaccess
<Files cambridge.php>
AuthType Ucam-WebAuth
AADescription "Brickhouse Theatre Company"
AACookieDomain www.srcf.ucam.org
Require valid-user
</Files>
The cambridge.php file is:
cambridge.php
session_start();
if(isset($_REQUEST["Ucam-WebAuth-Session"])) {
$wlsr_query = $_REQUEST["Ucam-WebAuth-Session"];
if ($wlsr_query!=false) {
session_start();
$_SESSION['wlsr_sess']=$wlsr_query;
}
}
$_SESSION['wlsr_vals'] = explode("!",$_SESSION['wlsr_sess']);
switch ($_SESSION['wlsr_vals'][1]) {
case 200:
$_SESSION['wlsr_vals'][1] = "Successful authentication!";
$_SESSION['wlsr_vals'][14] = "200";
break;
case 410:
$_SESSION['wlsr_vals'][1] = "Authentication cancelled at user's request";
$_SESSION['wlsr_vals'][14] = "410";
break;
case 510:
$_SESSION['wlsr_vals'][1] = "No mutually acceptable types of authentication available";
$_SESSION['wlsr_vals'][14] = "510";
break;
case 520:
$_SESSION['wlsr_vals'][1] = "Unsupported authentication protocol version";
$_SESSION['wlsr_vals'][14] = "520";
break;
case 530:
$_SESSION['wlsr_vals'][1] = "Parameter error in authentication request";
$_SESSION['wlsr_vals'][14] = "530";
break;
case 540:
$_SESSION['wlsr_vals'][1] = "Interaction with the user would be required";
$_SESSION['wlsr_vals'][14] = "540";
break;
case 550:
$_SESSION['wlsr_vals'][1] = "Web server and authentication server clocks out of sync";
$_SESSION['wlsr_vals'][14] = "550";
break;
case 560:
$_SESSION['wlsr_vals'][1] = "Web server not authorized to use the authentication service";
$_SESSION['wlsr_vals'][14] = "560";
break;
case 570:
$_SESSION['wlsr_vals'][1] = "Operation declined by the authentication service";
$_SESSION['wlsr_vals'][14] = "570";
break;
}
if ($_SESSION['wlsr_vals'][14]!=200) {
header("Location: ./ravenerror");
} else {
$ds=ldap_connect("ldap.lookup.cam.ac.uk");
if ($ds) {
$r=ldap_bind($ds);
$sr=ldap_search($ds,"ou=people,o=University of Cambridge,dc=cam,dc=ac,dc=uk", "mail=" . $_SESSION['wlsr_vals'][7] . "*");
$ldap_return = ldap_get_entries($ds, $sr);
$_SESSION["ldap_dets"]["crsid"] = $ldap_return[0]["uid"][0];
$_SESSION["ldap_dets"]["surname"] = $ldap_return[0]["sn"][0];
$_SESSION["ldap_dets"]["nicename"] = $ldap_return[0]["cn"][0];
$_SESSION["ldap_dets"]["college"] = $ldap_return[0]["ou"][0];
$_SESSION["ldap_dets"]["collegecode"] = $ldap_return[0]["instid"][0];
$_SESSION["ldap_dets"]["displayname"] = $ldap_return[0]["displayname"][0];
ldap_close($ds);
}
header("Location: ./register");
}
?>
You will also notice the LDAP function, which gets the college and name from CRSid from the ldap.lookup.cam.ac.uk service.
Writes all the details to the session cookie which register.php then enters into the form.
All works :-)
[ 3 comments ] ( 16 views ) | permalink |




( 3 / 182 )Thought I'd give a couple of workarounds that I found/adapted for the main .htaccess file:
The first gets rid of ?phpsessid in the querystring (defaulted to on if php.ini trans_id is on...)
Options +FollowSymlinks
RewriteCond %{QUERY_STRING} ^phpsessid=.*$
RewriteRule .* %{REQUEST_URI}? [R=301,L]
I ended up not needing this especially as I made a local copy of php.ini and symlinked it to every folder, but it's still there regardless.
The second is to get rid of .php from the end of every filename (personal preference, I just find it annoying!
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
[ 2 comments ] ( 12 views ) | permalink |




( 3 / 174 )Hello! Welcome to the Brickhouse Blog which I am starting on 25th September 2007.
Over the last two or three months, I've completely redesigned this site into a fully php coded website from a very basic 15 page html site. I've struggled to complete many of the functions which I've used, and have searched long and hard across the depths of php information sites trying to understand why some things don't work.
When I've got time, I'll backdate all the major pages that I've written and explain through each page. For the time being though, I'll add new posts whenever I change something on the main site (viewable here).
Phillip Kynaston (Brickhouse Webmaster)
[ 3 comments ] ( 13 views ) | permalink |




( 2.9 / 178 )
Calendar



