Apture

An example of what apture will or will not do.

After creating a post on HTML Redirection I will highlight the post and see if I can create a popup.

HTML Redirection.

So it is just a silly hyperlink and nothing is going to pop up. This is also after a reinstall of the apture tags into the footer. Emm… guess I better go look at the code.

Scott Hirsch, [email protected]

HTML redirection

If you need to redirect your visitors to a new page, this HTML redirect code may be just what you’re looking for.

When designing a web site, many times you must change the location of a web page. However, if the page is popular, your visitors may have already linked to it. In addition, the Search Engines have most-likely already indexed the page.

For this reason, it is best to replace your page with a new page that will redirect your visitors to the new page. This provides a great way to provide your visitors with the information they were looking for and prevent you from losing your traffic.

Place the following HTML redirect code between the <HEAD> and </HEAD> tags of your HTML code.

<meta HTTP-EQUIV=”REFRESH” content=”0; url=http://www.securewebs.com/index.html”>

So, for example the complete HTML for a simple page would be:

<html>
<head>
<title> redirection page </title>
<meta HTTP-EQUIV=”REFRESH” content=”0; url=http://www.brilliantglass.com/index.html”>

</head>
</body>
</html>

The above HTML redirect code will redirect your visitors to another web page instantly. The content=”0; may be changed to the number of seconds you want the browser to wait before redirecting.

Yum Repository

http://www.jasonlitka.com/yum-repository/

Jason Litka’s great yum repository.

Install PECL APC Cache

The Alternative PHP Cache (APC) is an op-code pre-compiler and a cache system that can boost the performance of a PHP application up to 10 times. Op-code caches are very effective for a Drupal website, since Drupal deals with large number of source files and time spent in parsing them significantly affects performance. However, if you don’t have XAMPP and need to install it on CentOS, you can follow this to get around some of the problems that happen with the default server settings. h2. Install Pre-reqs Using yum install the required prerequisites.


sudo yum install php-devel php-pear httpd-devel

Install APC

Use the command


sudo pecl install apc

at this point you’ll likely see the error


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/PackageFile/v2/Validator.php on line 1831

Apparantly, the PECL/PEAR scripts do not use the settings from /etc/php.ini so you need to update PEAR’s memory settings to give is some more breathing room. Edit the file /usr/share/pear/pearcmd.php and add the following at the beginning:

@ini_set('memory_limit', '16M');

Configure/Restart

Now configure PHP to use the new extension. Create the file /etc/php.d/apc.ini and in that file put:

extension=apc.so

Now restart apache

sudo /etc/init.d/httpd graceful

Maintenance

In the future, if new versions of APC are released, you can easily upgrade them using

sudo pecl upgrade apc

Yum Updates

Task: List all installed packages

List all installed packages, enter:
# rpm -qa
# yum list installed
Find out if httpd package installed or not, enter:
# rpm -qa | grep httpd*
# yum list installed httpd

Task: Check for and update specified packages

# yum update {package-name-1}

Task: Install the specified packages [ RPM(s) ]

Install package called httpd:
# yum install {package-name-1} {package-name-2}
# yum install httpd

Task: Remove / Uninstall the specified packages [ RPM(s) ]

Remove package called httpd, enter:
# yum remove {package-name-1} {package-name-2}
# yum remove httpd

Task: Display the list of available packages

# yum list all

Task: Display list of group software

Type the following command:
# yum grouplist

SpamCop is controversial

Welcome to our modern world, my world. We have been recommending Gmail even over our own mail system. They are both free, both good, but nobody dares to screw with Gmail servers. Client software has these “built-in send an abuse complaint buttons” and so if you don’t like the email by all means click that button – does not matter if you requested to be on someone’s list last year and don’t know how to get off or filter or setup a rule to send to your junk mail folder. Just hit that abuse button and fire off a complaint.

SpamCop is very controversial at best because third parties that don’t send spam are affected when an IP address they use becomes listed on the SCBL because of reports that accuse their IP address of being a spam/UBE source. This can happen because their IP address is shared with many other customers of their mail service provider. And as I mention, it is often the result of malicious, careless or over-zealous reporting of spam.

SpamCop blacklists lasts for 21 hours according to their website. We can’t do anything about it really. Wish we could. Wish I could sue some blacklisters that are as unethical as the spammers.

Running 32-bit/64-bit IIS

IIS7 – Running 32-bit and 64-bit ASP.NET versions at the same time on different worker processes

Below is how you do it from IIS7 manager:

  1. Right click on the Application Pool and select “Advanced Settings…” or select the same from the Actions pane after selecting the Application pool
  2. Change the “Enable 32-bit Applications” to True (if you want the application pool to spawn in a 32-bit mode)
  3. Click OK

Allowed TLD’s

These are the Top Level Domains that SecureWebs can register.

.asia
.be
.biz
.ca
.cc
.de
.es
.eu
.me
.mobi
.name
.org
.tel
.tv
.us
.ws
.at
.ch
.com.mx
.dk
.fr
.it
.li
.mx
.nl
.bz
.info
.cn
.com.cn
.net.cn
.org.cn
.co.in
.firm.in
.gen.in
.in
.ind.in
.net.in
.org.in
.co.uk
.ltd.uk
.me.uk
.net.uk
.org.uk
.plc.uk
.com
.net

301 Redirect

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301″ is interpreted as “moved permanently”.

You can Test your redirection with Search Engine Friendly Redirect Checker

Below are a Couple of methods to implement URL Redirection

IIS Redirect

  • In internet services manager, right click on the file or folder you wish to redirect
  • Select the radio titled “a redirection to a URL”.
  • Enter the redirection page
  • Check “The exact url entered above” and the “A permanent redirection for this resource”
  • Click on ‘Apply’

ColdFusion Redirect

<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”>

PHP Redirect

<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?>

ASP Redirect

<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/”
%>

ASP .NET Redirect

<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.new-url.com”);
}
</script>

JSP (Java) Redirect

<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/” );
response.setHeader( “Connection”, “close” );
%>

CGI PERL Redirect

$q = new CGI;
print $q->redirect(“http://www.new-url.com/”);

Ruby on Rails Redirect

def old_action
headers["Status"] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www.newdomain.com with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

What is your IP?

Sometimes is is nice for us to know your IP. If you are looking at this post it is the best guess for what that is. Very handy to debug a connection issue such as; you can’t connect to the mail server.