September 19, 2006

ModRewrite for Apache and IIS

There's a lot of ModRewrite tutorials out there, but I always had a hard time finding a pretty clear cut explanation for the most common uses: redirecting and making search engine friendly URLs out of query string dynamic ones. Finding a simple laid out example was always a bear as well. A friend recently asked me for a rundown on using ModRewrite for both Apache and IIS servers and I wrote out a pretty good email explanation and thought, hey, perfect blog post. So here goes:

"Rewrite" is a misleading term, nothing it really getting rewritten so to speak. What is happening is you are putting a matching statement first and then what content to serve. This statement sorta says, "If someone asks for this URL, then show them the content that would get served with this address". When you throw a 301 modifier at the end you say, "If someone asks for this URL, give them this content by redirecting them to it."

For Apache you would put something like the following in your .htaccess file. You can proceed a line with # to make it a comment or note that doesn't get processed:

# Something for Apache that is required for ModRewrite module to work
Options +FollowSymLinks

# Duh
RewriteEngine on

# Everything that follows is in relation to the root
RewriteBase /

# Redirecting via a 301 to a new page, ^ starts the match phrase to look for, $ ends it
RewriteRule ^RequestedPage\.html$ /GetBouncedHere.html [NC,R=301,L]

# This is the traditional ModRewrite for search engine friendly URLs
RewriteRule ^([a-zA-Z0-9]+)/pictures/([0-9]+)\.html$ /yourcode.php?type=pictures&forwho=$1&recID=$2 [NC,L]


NC means "no case" specific matching, R=301 is the type of redirect to use, L means this is the last rule, after running this stop and server the page. Inside parenthesis go your variables, things that can change. You have to declare what type of characters these can be, in this case, alpha numerical of either case. The + at the end means an infinite number of character would be allowed, without it it means one character of those types. For each set in parenthesis you plug a $1, $2, $3, etc... into where that variable needs to go into your dynamic URL. They don't have to be in order, you could call $2 before $1. The above would allow you to do something like /joemama/pictures/28.html and serve up a dynamic page that pulls in the record ID 28 from the pictures database for joemama, etc... Because we left out the R=301 we get a "Rewritten" URL instead of being permanently redirected.

For IIS it's the same concept just slightly different syntax and it goes in the httpd.ini file:

[ISAPI_Rewrite]

RewriteRule /OldPage\.html /NewPage\.html [I,RP,L]

RewriteRule /doc(.*)\.html /yourcode.asp\?document=$1 [I,L]



Just about the same except your have to escape (use \ ) on both ends, don't need the ^ and $ to mark the beginning and end of phrase matches. The modifiers at the end differ slightly, L is the same, I means Ignore case, and RP is redirect permanent. Everything else is nearly identical.

Note: Technically in Apache you can use [a-zA-Z0-9] and (.*) interchangeable, but by limiting the type of characters people can try and stick in the URL which gets passed into your query for your database, you prevent errors and security breaches. That's why Apache has that method available and is preferred, at least I think so.

The best tutorials and info on these I have found are:

September 05, 2006

MSN AdCenter Surveys

Has anyone else done the online survey MSN AdCenter sent out a few weeks ago? The 6 minute promised survey took more like 30 and the promise of an Amazon gift certificate never materialized. I figured par for the course with those guys, but then they have to gall to send out a notice that they have hired Ipsos Loyalty to conduct a phone survey and I should be expected a call from them over the coming weeks. Problem is I got about 20 of these, one for each client that I'm testing MSN for. Should I expect 20 survey calls whether I want them or not now? Maybe I'll just read them my last post about how much they are doing wrong and then ask them where my certificate is, 20 times.

August 24, 2006

Premium Turnkey Integrated Modular System Solutions

Sometimes when people think about their products internally and how they are described, there is a disconnect from what their customers might call them. An example would be a company who says they sell "spacial access systems" when in fact their customers just know them as "doors". Okay, that's an extreme example, but the point is, what you as a business may call your product and what those seeking it call them often can differ greatly. Unless your target audience are versed in these terminologies, companies need to take a hard look at those habits, identify the vague industry insider nomenclatures and abandon them forever. This gets your habits moving in the right direction, calling your products what people might be searching for in everything you do online, links, copy, menus, etc... and your keyword relevancy and search rankings will thank you.

There are also some really really bad habits companies have of naming products and services that are not industry specific, that are so universal that they truly mean nothing. Some good examples are the phrases "turnkey solution" or "modular systems". These mean nothing, not a single thing. Sure, they identify a vague concept, a general way of thinking or approach, but are you selling vague notions? The answer 99.9% of the time is going to have to be absolutely not. So using these phrases in describing your products, how do you ever expect to be found among not only your competitors in your industry, but among every player in every other industry in every market on the planet? That's pretty ambitious and not exactly worth the effort it would have to take. Seriously, this is like trying to rank for "widgets". Why do it? Abandon these all encompassing terms, don't be lazy in naming what you do, get specific, use the research you have, ask your customers to describe your products. This is one of those many cases where board members don't know best. If you ever find yourself describing your offerings in one of those meaningless vague phrases, stop immediately. Those bad habits will spill over into your online marketing and you will fail to connect to your customers.

"But this is what my customers call them," you might say, and that may be true enough. But if they hit the search engines and try their vague phrase and get the random unrelated junk that is inevitably going to be spit back out at them, you can bet your last dollar that they are going to qualify that search term and get a better result. THAT is where you want to be found. So, by putting your SEO efforts on terms like this, you not only give yourself a better chance for success, you also end up with a better more qualified pool of traffic. That means better conversion rates, and THAT is what you are doing this all for. Remember, it's not broad rankings and traffic that counts, but conversions!

MSN AdCenter = Sloppy, Sloppy Work

Yeah, it's been a while since I posted, I've got a few other blogs going on, but a pure need to talk about how MSN AdCenter is so mishandled has prompted me to speak up. Here are some major issues I've found that are just sloppy and totally unacceptable from supposedly the world's largest computer software company:

The support emails I get, they come from Moonshot Dev (BY2MTZPSQLE07) . WHAT??? Moonshot Dev... and a bunch of meaningless characters, very nice. But I will give them this, it's a step up from what they used to come from some long raw mail server address that looked like they didn't bother to take the minute needed to set up an email alias.

But the best part? Everytime I go to open their support email I get a big fat "Website Certified by an Unknown Authority" warning. Upon inspection it's because they decided to serve the graphic header for the email from: https://adcenter.msn.com/images/adCenter_p_h_pos_309x56.gif and then not bother to be sure the secure certificate at that location is set up right. So a big message proclaims that the trustworthiness of adcenter.msn.com is in question. Well, maybe they are just being honest. It's still unclear why a graphic needs to be served from a secure server anyhow, but Microsoft can't be bothered with petty little things like doing anything correct, now can they?

So why did I need a support email? Well apparently one of my ads ran afoul of their guidelines. They do not allow pharmaceutical sites to run ads on their network, and their sophisticated automated review system caught this disgusting violation. Uh, except that the ad was for a Pharmicist Job Search site, not drugs. The ad language, the resulting page and the keywords that were being bid on all clearly indicate the intent. But, you know, I can see the mistake... one time. But after getting on the phone a couple months ago to clear up the confusion and get the ads reinstated, 2 months later the exact same problem has occured on the exact same ads that have not changed. Way to bandaid the problem and not solve the underlying issue!

And let's talk about conversion tracking. It's the most useful thing a PPC can ever provide, it let's you know your ROI. But rather than provide a comprehensive tracking script that works in every browser because it's just standard plain old javascript like EVERY other PPC service out there, they provide some oddity that works just fine, unless you have Firefox. So what, you say. It's a minor player in the market place and so you don't track a portion of your conversions. Well, depending on your audience Firefox can be an average of 20% of your users, even higher for tech geared sites. If you're pushing any type of volume of traffic, that's a lot of people. But no, it doesn't just mean you lose some tracking data, your users actaully get some kind of secure certificate error on their confirmation page if you are using secure transactions. So your user completes their credit card transaction and gets an error message, that's just wonderful. That won't generate concerned calls from panicked customers or destroy your site's appearance of trust with secure information for consumers. It begs the question: Did Microsoft put this gotcha in for their most feared competitor in the browser market place intentionally, which would be unethical and flat out wrong for their advertisers, or are they just grossly incompetent in their development? There are only two answers to why that is happening, and neither is a good thing.

The reportingis horrible and gives you nothing useful as a report and you will never ever ever get the information you requested then. No, you get a "your report is being created, please return to request it again later and you can view it then" type message. Sadly this is what you see in Yahoo Search Marketing on occassion as well, and that needs to stop. Both you guys, buy a few more servers to handle the processing, stop being cheap, it's not acceptable to make me wait 5 minutes to tell me my click through rate for last month.

I won't even go into the oddly named sections of the interface, such as "orders" for something that well, isn't what anyone in their right mind would think of as an order.

So... maybe the big lesson to learn here is this: Beta testing in France is a stupid idea.

February 24, 2006

Google Analytics Invite... Finally

Been a little behind in posting, have had some family matters to tend to not to mention my upcoming wedding! But, I'm happy to say I finally received a Google Analytics invite for a client and will be posting some thoughts and observations on that very soon. I have to say so far, having to retract new signups and then wait months and months for any sign of providing the service is already giving Google a big F minus in my book. Don't launch if you can't produce, that's amateur hour stuff and surely should not be coming from an industry leader.