full of … these

Rewrite rule without losing the initial URI

Posted: November 9th, 2012 | Author: | Filed under: howto, idiots | Tags: , , | No Comments »

Today, I had to add a rewrite rule to keep the short word (keyword) after “domain.com/”.

So, you want to keep the keyword in the address bar, but load the long URI and not showing it.

Here is my solution:

RewriteRule ^/(keyword-or-short-name)/?$ /long/i-mean-long-very-long-with-lots-of-params.htm

Happy users!

 


Customer satisfaction

Posted: July 28th, 2012 | Author: | Filed under: personal | Tags: , | No Comments »

Feedback is very important to me. I do want my clients to understand that I work with them for them.

[10/28/2009 2:13:31 PM] Wxxxxx Hxxxxxx: I admire your will power.
[10/28/2009 2:25:25 PM] Wxxxxx Hxxxxxx: I understand.  You’re the sort of person whom I really admire – people who can do things with their hands.

[10/27/2010 11:12:05 AM] Txxxxx Fxxxx: from a certain “distance” the time working with you was really cool
[10/27/2010 11:12:39 AM] Txxxxx Fxxxx: and I remember you as one of the most .. let’s say friendly/happy guys there

Two different guys almost the same time.
These words made me so happy and fulfilled. You can’t buy this…

 

Added in 28-07-2012:

[26/06/2012 06:57 PM] Txxxxx Jxxx: Paul, thank you very much for your very good work and commitment! I’m very glad to work with you and i think we are now a really good team 🙂

[26/06/2012 06:59 PM] Txxxxx Jxxx: first to you because this is personal important for me and i would say this because you are working good so…

[26/06/2012 07:02 PM] Txxxxx Jxxx: but i’ll send this also to your bosses

 

Added in 09-11-2012:

Hi Paul,

for around one year you’re working very hard for the Data Center Move Project and you have done your job with great success and gorgeous effort. As you said in the past, for you it’s important to be useful.
I can say now, that you were very important AND useful for me within this project. Congratulations and thank you very much.

Thomas


IIS error: HTTP Error 500.19 – Internal Server Error

Posted: March 18th, 2012 | Author: | Filed under: howto, idiots | Tags: , , , | No Comments »

IIS permission error suck.

I got this error on a freshly server provided by a company:

HTTP Error 500.19 – Internal Server Error
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070005
Config Error Cannot read configuration file due to insufficient permissions
Config File \\?\E:\inetpub\wwwroot\web.config
Requested URL http://localhost:80/iisstart.htm
Physical Path
Logon Method Not yet determined
Logon User Not yet determined

I coul find a page with all errors and how to solve them,  but, none worked:

http://blogs.iis.net/webtopics/archive/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7.aspx

More testing reveled that moving the wwwroot directory from C drive to another drive, somehow affected the security and the access was denied to read the web.config file even the file was a non-existent one.

The solution, after some tests, was to not use wwwroot at all for the default web site. Instead, we created an empty directory in inetpub, and, it worked from the first try.

Also, the old configuration was working if the port 80 was changed to 8080. I have not tried other port, I was too angry to try another (e.g. 81).

Bugger…


Redirect http to https behind varnish for php services

Posted: July 21st, 2011 | Author: | Filed under: howto | Tags: , , | 1 Comment »

It may happen to want to redirect a site from http to https behind a varnish cache system.

Is known the fact that varnish has a lack of redirect procedures, mostly from http to https.

A redirect on varnish from http to https looks like this:

if (req.http.host ~ "^(www\.)?site\.com$" && req.url ~ "\/checkout\/cart") {
       error 750 "https://www.site.com/checkout/cart";
sub vcl_error {
 #redirect to https
 if (obj.status == 750) {
 set obj.http.Location = obj.response;
 set obj.status = 302;
 return(deliver);
 }
 }

That will not work!

Varnish is not aware if the request was made from http (request directly sent to varnish) or https (request sent to pound).

So, I have found another page suggesting that the redirect can be added to php like this:

if (($_SERVER['REQUEST_URI'] == '/admin' || $_SERVER['REQUEST_URI'] ==  '/checkout/cart/') && !$_SERVER['HTTP_X_FORWARDED_PROTO']){
  header("Location: https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}elseif (($_SERVER['REQUEST_URI'] != '/admin' && $_SERVER['REQUEST_URI'] != '/checkout/cart/') && $_SERVER['HTTP_X_FORWARDED_PROTO']) {
  header("Location: http://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}

This code fixes https redirection.
Any comments are welcome. I am new to varnish.


Blue Iris Error: 8000274d (OnConnect: 10061), block 0.

Posted: June 15th, 2011 | Author: | Filed under: idiots | Tags: | No Comments »

If you upgraded recently, automatically or not, and you can’t see anything in cameras added to Blue Iris you might have connectivity issues.

To debug this, telnet to the ip and port you have using in the camera settings.

If telnet is not working stop the firewall to be sure you are not  limited by it.  And try again in blue iris.

If still no luck, open tcpview, reset camera and quickly check the ports blue iris is accessing.

Compare the port actually used to the one you have setup on the camera. You may find that after the upgrade the ports were changed in blue iris.

I have found that my video port was replaced with default video port (port 554) and web port was changed to my custom video port.