301ing with ASP.NET
Sat, 07/12/2008 - 14:49 — cactusYou could put this in your code-behind pages or even your global.asax file.
string oldPath =HttpContext.Current.Request.Url.PathAndQuery;
string newUrl = "http://www.seocactus.com"+oldPath;
Response.Clear();
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", newUrl);
Response.End();
- Comment
- 65 reads
What to name your CSS Classes?
Wed, 10/31/2007 - 01:04 — cactusSo you just put together your awesome all-div layout. Hot. Now, before you think, you're done... you may consider your css id/class names. Did you really just name your footer div's class "footer"? You did? Oh ok, well... how important do you think that sounds? And better yet, does it relate to anything on your site?
Use Only Quality Meta tags
Sun, 08/12/2007 - 22:17 — cactusWhen adding description and keyword meta tags to each of your pages be sure to include only quality words that are actually listed somewhere on the page. If not, it might be looking a bit spammy and your pages might get the dreaded "supplemental result" label.
For example, this page's meta tags might look something like this:
Remove PHPSESSID from URL
Sun, 07/01/2007 - 19:26 — cactusNot only do URLs with PHPSESSIDs look terrible, but they could easily be thought of as duplicate content. You've probably seen them:
Something like this perhaps...
...index.php?PHPSESSID=6834tgksdfdadgfdgaglkghd
Yuck. You can easily turn that off with a line in your .htaccess file:
php_flag session.use_trans_sid off
And that should do it!
- Comment
- 537 reads
Use Multiple CSS Classes
Sat, 06/30/2007 - 15:20 — cactusDid you know you can use multiple css classes in an html element? I'm sure you knew that, but in any case, here's an example of how someone might have done this in the past:
<style type="text/css">
.e {color:red; font-size:12px;}
.eBold {color:red; font-size:12px; font-weight:bold;}
</style>
