# BEGIN HotLinkProtection
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomainname.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
# END HotLinkProtection
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Thursday, December 2, 2010
Image Hotlink Protection In Wordpress
There are certain hotlink Wordpress plugins that do the job of hotlink protection of images on your site. If you are using Wordpress, you can simply create a .htaccess file from the code below and upload it to your uploads folder which is in your wp-content folder. Make sure the filed is named .htaccess In the code below make sure to change the yourdomainname.com to whatever your domain is. Also add any other file extensions you might want to prevent being hotlinked. to this group jpg|jpeg|png|gif in the code below. Usually though it is just images that folks want to protect. After you upload it. Clear your browser cache and test that an image can be hotlinked at a site like this. There are many of these sites all over the net. No matter how busy or slow a site is, it would not be surprising to see an image of your hotlinked every now and again. This htaccess folder can also be used in any other folder where you might use images as well.
Thursday, October 7, 2010
New Google QR Code Generator
Been a busy day as my grandfather passed away this morning. He was 90 plus, so he did not get cheated and went down hill in just a few days. No lingering and suffering. Regardless, it has me tied over over the next few days into next week. I am headed back out to family here shortly, but wanted to pass along a link to the new Google QR Code Generator. As Mark Sprague points out in the post, it has a long way to go, but you will be seeing more and more of that type code image in magazines, newspapers and the web. It is used already in Website Magazine and has been for quite a while. Do not ignore this going forward.
Monday, September 27, 2010
Interactive Photos With Phlook
I came across Phlook today which is a service that makes photos interactive and more engaging in the process. I have not tried it, but I have it on my list to get to by this weekend. First you take a photo and upload it to Phlook and then you get an embeddable piece of code which is then entered into your content or blog post and the photo shows up with several interactive options. Surfers will have the ability to leave a note on the photo, vote on the picture along with having zoom functions and the ability to email the photos. Of course this will not be a fit for ever site you build, but my wheels are already turning on how to best implement this. You can see a demo here.
Saturday, August 7, 2010
WP Htaccess Control Wordpress Plugin
A reader asked me the other day what Wordpress plugin I use for htaccess control. I emailed back that I really have not ever used a plugin for that and that I usually do it manually. The more I thought about, the more useful I thought it might be for those that do not have that much experience working with .htaccess files. I am currently testing the WP htaccess Control plugin right now and so far, so good. This plugin is for the more experienced user that understands htaccess, but is easy to learn and use. I would use it on a test site before using it wide spread as I said earlier, I am currently testing it myself. If you want to read up more on what .htaccess is and does, you can start here. If you know of a better one, shoot it on over to me.
Tuesday, July 27, 2010
Keywords To Websites Theme RSS Modification
Not sure if Mark corrected this in his default giveaway template in the Keywords To Websites Wordpress plugin since I purchased it, but you need to make sure you are showing the proper RSS feed in that template. I hate a note about that, but forgot to mention it in the previous post.
if you click on Appearance and then Editor in your Wordpress admin, you will then Main Index Template(index.php) on the right of the page. Click on that link and then edit the line of code below:
and replace with the code below and press update file:
The current way it is coded shows his sites RSS feed and not yours.
if you click on Appearance and then Editor in your Wordpress admin, you will then Main Index Template(index.php) on the right of the page. Click on that link and then edit the line of code below:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://feed.affiliatemarketer.info/affiliatemarketerinfo" />
and replace with the code below and press update file:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Comments Feed" href="<?php bloginfo('comments_rss2_url'); ?>" />
The current way it is coded shows his sites RSS feed and not yours.
Friday, January 29, 2010
BANS Cloaking Redirect Fix
Tao has come up with a re-direct fix for US stores for BANS since a few feed parameters changed. You will want to edit both the index.php file and the FrontControl.php file in BANS for this fix to work correctly.
Make sure you back up both these files before making any changes. You can open these up in notepad, but I highly suggest using a code editor like PSPad, I think it is still free and very easy to use. The FrontControl.php file is in the cont folder of your install while the index.php is likely in the root directory unless you installed BANS in a sub directory.
Open both files and scan for this block of code below:
Replace that code with this block of code:
Save both files back to your hard drive and FTP them back to their appropriate places. You may be prompted to over write the existing files, just say Yes.
Log into your BANS admin and go to settings. Check the cloak option in box 4 and hit save. Reload your BANS site home page and check that an eBay listing URL is indeed cloaked and click it to make sure it redirects properly to the matching listing on eBay.
Make sure you back up both these files before making any changes. You can open these up in notepad, but I highly suggest using a code editor like PSPad, I think it is still free and very easy to use. The FrontControl.php file is in the cont folder of your install while the index.php is likely in the root directory unless you installed BANS in a sub directory.
Open both files and scan for this block of code below:
if(($siteType == "US") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/711-53200-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.com%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AUS%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
Replace that code with this block of code:
if(($siteType == "US") && ($cloak == "1")){
$itempos = strpos($link[$counter],"item=");
$cloakeditem = substr($link[$counter],$itempos+5,12);
$cloakedtitle = preg_replace("/[^a-zA-Z0-9\s]/", "", $title[$counter]);
$link[$counter] = URL_PATH.'/item/'.str_replace(" ","-",$cloakedtitle)."_W0QQitemZ".$cloakeditem;
}
Save both files back to your hard drive and FTP them back to their appropriate places. You may be prompted to over write the existing files, just say Yes.
Log into your BANS admin and go to settings. Check the cloak option in box 4 and hit save. Reload your BANS site home page and check that an eBay listing URL is indeed cloaked and click it to make sure it redirects properly to the matching listing on eBay.
Monday, January 25, 2010
Free Video Clip Embeder
Every now and again, I run across an instance where I have a link to a video or audio clip and want to embed it on a web page. If the site is Wordpress, I just use a Wordpress plugin, but I also have a few non Wordpress sites built with BANS or even Blogger blogs that I need to embed videos or audio on. I came across a free video code maker that makes embedding video a breeze on sites not built with Wordpress. You can choose the size of the video, whether it auto starts and if you want to show controls as well. Just fill in the details and click the Make HTML button and copy the code it spits out at the bottom. Very simple. Make sure to bookmark this site, as you never know when you might need it.
Wednesday, November 18, 2009
CJ Niche Store Wordpress Plugin Search Results Template Mod
While browsing the PHPBay forum, I came across an interesting mod you can make while using the CJ Niche Store Wordpress Plugin to your Search Results page (search.php) in your Wordpress template to show items from Commission Junction based on search terms a surfer uses. The code below will go in place of everything between the <div class="postarea"> and closing </div> tag. It will of course differ from template to template that are using with Wordpress, but the main code piece is below.
Here's <? echo $_GET["s"]?> for sale at YOUR STORE NAME HERE.
<p>
<?php
function cjnichesearch($term) {
$keywords = $term;
$text .= '[cjniche keywords="'.$keywords.'" listing="10"]';
echo do_shortcode($text);
}
cjnichesearch($_GET["s"]);
?></p>
Here's <? echo $_GET["s"]?> for sale at YOUR STORE NAME HERE.
<p>
<?php
function cjnichesearch($term) {
$keywords = $term;
$text .= '[cjniche keywords="'.$keywords.'" listing="10"]';
echo do_shortcode($text);
}
cjnichesearch($_GET["s"]);
?></p>
Monday, November 2, 2009
Studio Press Fix For Using ReviewAzon
I recently was implementing the ReviewAzon Wordpress plugin into the Lifestyle Wordpress theme by Studiopress and noticed it shoves the Amazon listing all the way on the right of that theme. This is easily fixed by opening the index.php and page.php pages of the template and adding:
<div style="clear:both;">
before:
</div>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
on both template files.
This should bring everything into alignment. This fix will likely be needed on a few of the other Studiopress themes, but I haven't gotten to any of them yet to check.
<div style="clear:both;">
before:
</div>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
on both template files.
This should bring everything into alignment. This fix will likely be needed on a few of the other Studiopress themes, but I haven't gotten to any of them yet to check.
Thursday, October 15, 2009
Changing The Header File In Wordpress Ads Theme Template
I meant to knock this out earlier for those using the Wordpress Ads theme. It has some coding issues in the header.php file. If you have already uploaded the theme, you will want to go to your Dashboard and click on Appearance and then Editor underneath that. Then on the far right you want to click on Header (header.php). You will then want to replace the code listed below with the second set of code in this post and click Update File. This will cure some bad coding in the header of the template.
REPLACE THIS:
WITH THIS:
REPLACE THIS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php if (wp_version()=='21') language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('name'); echo(' — '); bloginfo('description'); } ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<meta name="description" content="This is 2 or 3 column Ads Theme and it is totally free for download."/>
<meta name="keywords" content="theme, template, wordpress, wordpress theme, wordpress template, beautiful theme, beautiful template, beautiful wordpress theme, beautiful wordpress template, unique wordpress theme, professional wordpress theme, unique wordpress template, unique wordpress theme"/>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="Shortcut Icon" href="<?php bloginfo('stylesheet_directory');?>/images/favicon-adstheme.ico" type="image/x-icon" />
<?php wp_head(); ?>
</head>
WITH THIS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php if (wp_version()=='21') language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="Shortcut Icon" href="<?php bloginfo('stylesheet_directory');?>/images/favicon-adstheme.ico" type="image/x-icon" />
<?php wp_head(); ?>
</head>
Tuesday, July 28, 2009
Commission Junction Form Buttons Fun
I have been working with integrating in some Commission Junction product links into some of BANS sites on pages that I have exact product matches for. At the same time I just want to give the surfer an option other than eBay without cluttering up the page. Lately this form buttons I have been making have been converting quite nicely. I merely strip down the HTML links given in the "Get Links" portion in for certain product in the CJ admin section.
Below is the code it gives me:
<form method="get" action="http://www.dpbolvw.net/interactive" target="_top">
<table border="0" width="600" cellpadding="5" cellspacing="0">
<tr>
<td valign="top" width="10%"><img src="http://us-preview.ebooks.com/previews/000/000300/000300287/000300287-sml-1.jpg" border="0" alt="How to Make Money Online with eBay, Yahoo!, and Google"/></td>
<td valign="top" >
<p><b><font size="4">How to Make Money Online with eBay, Yahoo!, and Google</font></b></p>
<p><font size="2">Groundbreaking strategies for reaching millions of customers online and boosting traffic, sales, and profits This full-color, seminar-in-a-book presents a proven plan for maximizing your online profits by leveraging the top three services: eBay, Yahoo! and Google. You?lllearn to: expand an existing eBay business to reach millions of targeted buyers; Open a Yahoo! store to build a thriving direct-to-customer business; and send more customers to their online retail business with improved search engine placement and targeted adword buys using Google. How to Make Money Online with eBay,Yahoo!, and Google explains how to use cross-merchandising and integration strategies to promote sales and manage inventory across multiple sales channels.</font></p>
<hr>
<input type="hidden" name="pid" value="0000000"/>
<input type="hidden" name="aid" value="00000000"/>
<input type="hidden" name="cjsku" value="000000"/>
<input type="hidden" name="url" value="http://www.ebooks.com/cj.asp?IID=300287"/>
<input type="submit" value="Buy"/>
</td>
</tr>
</table>
</form>
<img src="http://www.lduhtrp.net/image-2811192-10281551" width="1" height="1" border="0"/>
I strip out everything except for the form tags and input tags and change the "Buy" value to whatever I want it to be. This makes for an unobtrusive ad of sorts.
Below is the stripped down version:
<form method="get" action="http://www.jdoqocy.com/interactive" target="_blank">
<input type="hidden" name="pid" value="0000000">
<input type="hidden" name="aid" value="00000000">
<input type="hidden" name="cjsku" value="000000">
<input type="hidden" name="url" value="http://www.ebooks.com/cj.asp?IID=139648">
<input type="submit" value="Check Price On eBooks.com">
</form>
And here is the finished button:
Below is the code it gives me:
<form method="get" action="http://www.dpbolvw.net/interactive" target="_top">
<table border="0" width="600" cellpadding="5" cellspacing="0">
<tr>
<td valign="top" width="10%"><img src="http://us-preview.ebooks.com/previews/000/000300/000300287/000300287-sml-1.jpg" border="0" alt="How to Make Money Online with eBay, Yahoo!, and Google"/></td>
<td valign="top" >
<p><b><font size="4">How to Make Money Online with eBay, Yahoo!, and Google</font></b></p>
<p><font size="2">Groundbreaking strategies for reaching millions of customers online and boosting traffic, sales, and profits This full-color, seminar-in-a-book presents a proven plan for maximizing your online profits by leveraging the top three services: eBay, Yahoo! and Google. You?lllearn to: expand an existing eBay business to reach millions of targeted buyers; Open a Yahoo! store to build a thriving direct-to-customer business; and send more customers to their online retail business with improved search engine placement and targeted adword buys using Google. How to Make Money Online with eBay,Yahoo!, and Google explains how to use cross-merchandising and integration strategies to promote sales and manage inventory across multiple sales channels.</font></p>
<hr>
<input type="hidden" name="pid" value="0000000"/>
<input type="hidden" name="aid" value="00000000"/>
<input type="hidden" name="cjsku" value="000000"/>
<input type="hidden" name="url" value="http://www.ebooks.com/cj.asp?IID=300287"/>
<input type="submit" value="Buy"/>
</td>
</tr>
</table>
</form>
<img src="http://www.lduhtrp.net/image-2811192-10281551" width="1" height="1" border="0"/>
I strip out everything except for the form tags and input tags and change the "Buy" value to whatever I want it to be. This makes for an unobtrusive ad of sorts.
Below is the stripped down version:
<form method="get" action="http://www.jdoqocy.com/interactive" target="_blank">
<input type="hidden" name="pid" value="0000000">
<input type="hidden" name="aid" value="00000000">
<input type="hidden" name="cjsku" value="000000">
<input type="hidden" name="url" value="http://www.ebooks.com/cj.asp?IID=139648">
<input type="submit" value="Check Price On eBooks.com">
</form>
And here is the finished button:
Sunday, April 12, 2009
Use Nofollow When Needed On External Links
Yesterday I referenced bad habits! A bad habit I have is getting in a hurry with out going links that need to be nofollowed like affiliate links. There is really no reason to share the link juice and vouch for affiliate links. Plus you can better redirect that link juice to other sites or internal as well. To nofollow a link is simple. All you do is add:
rel="nofollow"
to the end of the link. So a nofollow outgoing link to Yahoo would look this below:
<a href="http://www.yahoo.com/" rel="nofollow">Yahoo</a>
rel="nofollow"
to the end of the link. So a nofollow outgoing link to Yahoo would look this below:
<a href="http://www.yahoo.com/" rel="nofollow">Yahoo</a>
Sunday, April 5, 2009
Javascript Is Not A Bad Thing
I have been platying around with some of the new EPN tools and turning the RSS feeds into javascript to show listings on some sites, to see the usefulness. I am seeing some great results with the only drawbacks being that Google does not index the javascript, which is not a new secret. If your content on the page can hold it's own, I really see no need to have the listings cached. Google has been using javascript for quite a while with Google adsense with great results and is not in a hurry to change it. So if you find and affiliate program that offers RSS feeds and you want to display them as javascript, I think you have nothing to be afraid of. I am finishing up some projects to show newbies how to use EPN with free blogger platforms such as blogger using the EPN RSS feed generator and Yahoo Pipes, so you will want to stay tuned for that soon.
See below:
See below:
Monday, December 15, 2008
Block Access To Directories
I wanted to address how to block access to directories or folder access on your site. Lets say you have images in a folder named images. You do not want others to be able to view the contents of that directory or folder. To block access to all directories on a site merely copy the code below and add it to your .htaccess file.
Options -Indexes
To double check if it works, merely type into your browser an open directory, take the images folder for example, the url you need to plugin assuming images was a directory under the root, would be...
http://www.yourdomain.com/images
If you can see the contents of that folder, you did it wrong.
Im off to close up a few holes myself while we are talking about it.
Options -Indexes
To double check if it works, merely type into your browser an open directory, take the images folder for example, the url you need to plugin assuming images was a directory under the root, would be...
http://www.yourdomain.com/images
If you can see the contents of that folder, you did it wrong.
Im off to close up a few holes myself while we are talking about it.
Monday, October 27, 2008
IE6 Transparent PNG Fix For New BANS Templates
OK, we have all seen the new BANS templates with the transparent PNG images that gives Internet Explorer 6 fits. There is a workaround or at least a livable fix I have found that at least makes the site look decent in IE6.
the fix home page can be found here.
Download this zip file to your harddrive.
Copy and paste the below code in front of the last </head> tag in your header.php file.
<!--[if lt IE 7]>
<script type="text/javascript" src="unitpngfix.js"></script>
<![endif]-->
Upload the unitpngfix.js file to the root of your site.
Upload the clear.gif image file to the images folder.
Reload your site in IE6 and see if you are now seeing color where once was clear. If you do not see that it is fixed, open the unitpngfix.js file in a text editor and make sure all the paths are correct. Make sure it points to the image folder and file that you uploaded the clear.gif image file to.
lastly you should urge all your friends, enemies, pastor, ex wives, mistresses and anyone else that they should upgrade from IE6 to IE8 or make the jump to Firefox. Coders are caring less and less about Internet Explorer 6 as it is a farce of a browser.
the fix home page can be found here.
Download this zip file to your harddrive.
Copy and paste the below code in front of the last </head> tag in your header.php file.
<!--[if lt IE 7]>
<script type="text/javascript" src="unitpngfix.js"></script>
<![endif]-->
Upload the unitpngfix.js file to the root of your site.
Upload the clear.gif image file to the images folder.
Reload your site in IE6 and see if you are now seeing color where once was clear. If you do not see that it is fixed, open the unitpngfix.js file in a text editor and make sure all the paths are correct. Make sure it points to the image folder and file that you uploaded the clear.gif image file to.
lastly you should urge all your friends, enemies, pastor, ex wives, mistresses and anyone else that they should upgrade from IE6 to IE8 or make the jump to Firefox. Coders are caring less and less about Internet Explorer 6 as it is a farce of a browser.
Saturday, October 18, 2008
Learning Basic HTML Will Help You
Right now I am learning PHP. I know some PHP and am what is called a PHP hack. I can decipher some code problems and hack pieces together and troubleshoot code, but I really do not fully know PHP like I should. Some of you really do not know HTML which is basic web page building code. Most of you and most new webmasters in general rely solely on WYSIWYG (What You See Is What You Get) editors like is included in BANS. While the WYSIWYG editors are great for newbies, it does not mean you should not be studying up on your HTML. Learning HTML will help you decipher basic page building errors and make your designing skills much better as well.
I started building websites many many many many years ago and learned HTML before the WYSIWYG editors arrived or were affordable. I learned off of one free site. HTML Goodies. This site has been archived back to May 1997 and I swear it was online way before that. It has really evolved and the exercises are much easier. If you plan to make money online, you need to understand the basics of webpage building and it starts with HTML.
Now excuse me as I have a ton of reading to do myself. You can see what I am reading and learning below. It is 1010 pages and I am on page 48.
I started building websites many many many many years ago and learned HTML before the WYSIWYG editors arrived or were affordable. I learned off of one free site. HTML Goodies. This site has been archived back to May 1997 and I swear it was online way before that. It has really evolved and the exercises are much easier. If you plan to make money online, you need to understand the basics of webpage building and it starts with HTML.
Now excuse me as I have a ton of reading to do myself. You can see what I am reading and learning below. It is 1010 pages and I am on page 48.
Sunday, October 5, 2008
Finding Your Server Path And PHP Settings
More than once I will be working on coding or fixing others BANS sites, I run into different type servers that utilize the path to the files different. A good simple code for this and to see what other PHP info is on the server, you can use the code below:
<?php
phpinfo ();
?>
Just copy it into a notepad file and save as serverinfo.php and upload it to whatever directory you are looking for the path info on. Then call it in a browser with http://www.yourdomainname.com/folderyouuploadeditto/serverinfo.php
It will also tell you a slew of other info as well without having to break and login into your cPanel or hunting elsewhere. You never know when you will need it, but it does come in handy.
<?php
phpinfo ();
?>
Just copy it into a notepad file and save as serverinfo.php and upload it to whatever directory you are looking for the path info on. Then call it in a browser with http://www.yourdomainname.com/folderyouuploadeditto/serverinfo.php
It will also tell you a slew of other info as well without having to break and login into your cPanel or hunting elsewhere. You never know when you will need it, but it does come in handy.
Friday, August 1, 2008
Does Your Site Have Canonicalization Issues?
http://www.yourdomain.com and http://yourdomain.com or 2 different sites in the eyes of most SERPs. You may have no control over how people link to you, be it with or without the www. A good test is to type this into Google:
site:yourdomain.com
Look at the results returned. Are you seeing both www and non www urls? If so this is no good. Make sure to notate how many pages are indexed. Another check after that is done is to type this into Google:
site:www.yourdomain.com
If you are seeing a different amount of pages returned then the first search you more than likely have canonicalization issues. The first thing is to log into your Google webmaster tools account and let Google know your preferred domain name. This is under the tools section in your account. The next thing you want to do is apply the .htaccess canonicalization fix.
Redirect Non-www to www code below that goes in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdoman\.com [NC]
RewriteRule (.*) http://www.yourdoman.com/$1 [L,R=301]
Redirect www to Non-www code below that goes in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdoman\.com [NC]
RewriteRule (.*) http://yourdoman.com/$1 [L,R=301]
Don't be burned by letting the SERPs think you have duplicate content of your site on your own site. Make sure you make a backup of your original .htaccess in case you do something wrong. Try typing the opposite of what you want oin your browser to make sure it does redirect properly.
site:yourdomain.com
Look at the results returned. Are you seeing both www and non www urls? If so this is no good. Make sure to notate how many pages are indexed. Another check after that is done is to type this into Google:
site:www.yourdomain.com
If you are seeing a different amount of pages returned then the first search you more than likely have canonicalization issues. The first thing is to log into your Google webmaster tools account and let Google know your preferred domain name. This is under the tools section in your account. The next thing you want to do is apply the .htaccess canonicalization fix.
Redirect Non-www to www code below that goes in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdoman\.com [NC]
RewriteRule (.*) http://www.yourdoman.com/$1 [L,R=301]
Redirect www to Non-www code below that goes in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdoman\.com [NC]
RewriteRule (.*) http://yourdoman.com/$1 [L,R=301]
Don't be burned by letting the SERPs think you have duplicate content of your site on your own site. Make sure you make a backup of your original .htaccess in case you do something wrong. Try typing the opposite of what you want oin your browser to make sure it does redirect properly.
Monday, July 28, 2008
Making Content Links The Same Color Store Wide
If you want your content links to match the same site wide in your Build A Niche Stores, you can add the simple code below to the top or bottom of the the theme CSS file. Of course you need to change the hex code color to the color you desire, but it is a quick and dirty fix as to not have that default blue link color show up.
a {
color: #BF0A3A;
}
a:hover {
color: #000000;
}
Here also is a color palette to bookmark that has the hex colors listed as well.
If you are a newbie and want to know how to make a text link via html, the below code will show you how.
<a href="http://www.google.com">Your Link Text Here</a>
Have a great Monday and keep your heads up!
a {
color: #BF0A3A;
}
a:hover {
color: #000000;
}
Here also is a color palette to bookmark that has the hex colors listed as well.
If you are a newbie and want to know how to make a text link via html, the below code will show you how.
<a href="http://www.google.com">Your Link Text Here</a>
Have a great Monday and keep your heads up!
Saturday, July 26, 2008
Make A Sitemap Index For Multiple Sitemaps
Having sold many of the Wordpess BANS templates, the biggest question I get support wise is what to do with the multiple sitemaps. well I highly suggest making a sidemapindex file and submitting that to Google or put in your robots.txt file. This is easy accomplished by copying the code below into notepad and changing the address of the sitemaps listed. Save the file as sitemapindex.xml and upload to the root directory of the site. It should map out the locations of your multiple Wordpress and BANS store sitemaps into one easy sitemap xml file.
<?xml version="1.0" encoding="UTF-8" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.yourwebsite.com/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>http://www.yourwebsite.com/store/sitemap.xml</loc>
</sitemap>
</sitemapindex>
<?xml version="1.0" encoding="UTF-8" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.yourwebsite.com/sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>http://www.yourwebsite.com/store/sitemap.xml</loc>
</sitemap>
</sitemapindex>
Subscribe to:
Posts (Atom)





