affiliate_link

Wednesday, July 18, 2012

Check a website in Google Cache

Use following URL

Replace mywebsite.com with the website url to check without http

http://webcache.googleusercontent.com/search?q=cache:mywebsite.com

Tuesday, July 17, 2012

Permanent (301) redirection in PHP

Following is the code for permanent (301) redirect using php.
Better approach is to use .htaccess but there are situations where .htaccess could not be used so using following code might help

@header("HTTP/1.1 301 Moved Permanently");
@header("location: http://www.mywebsite.com");

Additionally if you want to redirect your home page to always open using www. which might be usefull when using cookies or for SEO. Add an if condition to code 

if (!preg_match('/www\..*?/', $_SERVER['HTTP_HOST']))
{
    @header("HTTP/1.1 301 Moved Permanently");
    @header("location: http://www." . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}

Monday, July 16, 2012

301 Redirect in classic ASP

<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.website.com/"
Response.End
%>


Above code is enough for Redirection but its better put a link because you never know a user might have turned off auto redirection

<table>
    <tr>
        <td align="center" width="100%">
            <h1>The page you are looking for has moved...</h1>
            We have recently updated our site and the page you are looking for has moved.
            Click <a href="http://www.website.com/">here</a> to continue
        </td>
    </tr>
</table>

Dexterity Installation

Dexterity Installation & Development

GP Installation       
                                                                                                
1       Install GP with Test Company
2       Run GP utilities
3       Login with SQL Server username and password

Running Dexterity for the first time 

1       Copy Dex.ini from Microsoft GP folder to Dexterity
2       Copy DGPWin32.dll from GP folder to Dexterity
3       Copy Dynamics.dic from GP folder to some other folder (preferably desktop) to open/edit from Dexterity
4       Create System DSN (e.g. gp-local)
5       Open Dexterity and browse to folder where dynamics.dic is present by clicking
    File -> Open Dictionary
6       When opened click File -> Login -> Select DSN (gp-local) enter username and password to login





7    Check if its running by typing Click CTRL + T or Debug -> Test Mode
If dexterity installed & running successfully it should open the following window


 
Enter SQL Server username & password to continue