.htaccess – all you ever wanted to know

For me, this has always been frustrating because I use it only once every 8-12 months. Here are some great links to get refreshed.

Basically, what I was trying to do was get all traffic https going to my customers’ mywebsite.com/payments page and all other traffic without “/payments” in the name to mymainwebsite.com. It is important to note, that the myshorturl.ca site is the one with the https or SSL on it. Here are the links I used

The eventual code form my .htaccess file was

#RewriteCond {HTTPS} on
#RewriteRule ^(.*)$ https://www.myshorturl.ca/payments/$1

#RewriteCond %{HTTPS} on
#RewriteRule .* https://www.myshorturl.ca/payments [R,L]

RewriteCond %{REQUEST_URI} /tithe [NC]
RewriteRule ^(.*)$ https://www.myshorturl.ca/payments/ [L,R=301]

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /payments [NC]
RewriteRule ^(.*)$ https://www.mycumbersomeurl.ca/payments/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www.mycumbersomeurl.com$ [NC]
RewriteRule ^(.*)$ http://www.mycumbersomeurl.com/$1 [L,R=301]

Share Button

Curve Fitting, c# and Math.Net


Some explanation about their regression formulas … and bingo – instant genius created (me). Thanks guys – it was really you all. Oh, and my first MVC project – that is a step forward even if it is only MVC 4.

jQuery Bar and Line Charts alongside Twitter Bootstrap for MVC 4 . Another friend recommended D3js to me for charting

I am currently trying these steps (free-er)

  1. Update VS 2012
  2. Install Nuget Package Manager (was already done)
  3. Git Tools
  4. Web Essentials (but first install this) – cannot be installed on VS 2012 express

Ok – so try this website where he installs Bootstrap on MVC 4 on VS 2012 Express


Share Button

jQuery Bar and Line Charts alongside Twitter Bootstrap

jQuery Bar and Line Charts alongside Twitter Bootstrap for MVC 4 

After reading – I am now trying 2013 Visual Studio Express MVC 5 with BootStrap. Here is the link. I will keep you posted

I got stuck with VS 2012 as I could not install Web Essentials. Why also not be up to date. Continue reading

Share Button

A really good example of scripting the InternetExplorer.Application with downloads

Here is someone who wanted to automate downloads with consistency as seems to have achieved it. It has some SendKeys in it so it is not autonomous – but is a great example of getting it done no matter what. Well done. I am looking for code to see if a machine is alive in < 5 seconds. If not, alert the user to wait. It has an Http Basic Authentication popup that I am trying to get through using tools natively installed on Windows. Of course Curl can do it but that requires all users installing it which is not acceptable for this use.  I need 4 concepts from this article. Here is the msdn on InternetExplorer.Application.


My code if it was a userform username / password would be like this. Basically you can’t easily unless the registry value is changed specifically allowing the username/password to be sent along in the url. Here is an idea that no one validating has having worked and is in powershell. People did get it working using SendKeys – which I do NOT want. Curl it is! This stuff is not good to post online, but alas, explains why one should NOT store their passwords on any browser.

Share Button

Adding jQuery to ANY page via local browser – greasemonkey

Here are lots of links on how to find out what to use


Settled in on greasemonkey for Firefox.


Debugging – can’t get this working with the latest versions of things.  Another Link and I have given up with Firebug or Web Developer Tools.

suggest loading local js file (does not work – so again – forget local debugging!!) 

Blocked Content warning in Firefox – simply press the shield in the upper left corner of the url.

Storing vars across pages

Share Button