A little something about everything

internet marketing and website development made simple..

How to make google only look at lower case url for sites hosted on windows IIS Server, fixes duplicate title tags in Webmaster Tools error

This method can be used to fix duplicate content errors and make it so google only indexes one version of your urls, which will prevent you from getting a negative modifiers.

In order to do this you have two options.

  1. Use the proper canonical tags, for example place the following code at the top of your website:
  2. Use the following script to automate the process and only allow lower case urls to be viewed on your site, create a global.asax file and place it in your site's main directory. 

If you plan to use both methods be sure to use only lower case for your canonical tags or you will end up with problems.

How to install silverstripe on IIS 7.5 - Manually

Step by step process to install silverstripe on IIS 7.5 (Windows Server 2008 R2 / Windows 7)

  • First download the full package, you will need a way to extract the file from tar.gz files such as WinRAR
  • Extract the files to your wwwroot or manually specified website directory
  • Create a site using InetMgr.exe with the following settings
    • Authentication should use ApplicationPoolIdentity
      • Application pool needs to use "No Managed Code"
      • Application pool also needs to be 32-bit "True" as php does not run in 64 bit
      • Application pool Managed Pipeline Mode needs to be "Classic"
  • Set file permissions as follows for IIS AppPool\Identity (ie. IIS AppPool\mywebsite.tld)
    • wwwroot/ & all subsequent directories - Read/Execute
    • Remove execute and add write permissions to the wwwroot/assets folder as well as wwwroot/web.config file and wwwroot/mysite/_config.php file.
  • Now open your browser and go to your site by name or ip/install.php and follow the instructions.

 

If at this point you get the error: "The web server isn't letting me identify where files are stored." you will need to edit the bad code in install.php file as follows:

Open install.php with a HTML editor like notepad++ and On line 863 update the line "if(!$this->baseDir) $this->baseDir = realpath(dirname($_SERVER['SCRIPT_FILENAME'])) . DIRECTORY_SEPARATOR;" to read "if(!$this->baseDir) $this->baseDir = '(DRIVELETTER):\(your-path-to-wwwroot)\(silverstripe-home)\';"