Tag Archives: Dynamic URLs

Mod_rewrite doesn’t look at arguments? D’oh!

Mod_rewrite doesn’t look at arguments? D’oh!

Posted on 09. Jun, 2009 by Carolyn Shelby.

4

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

When I converted my old, kloodgy Web site into WordPress last year, one of the reasons I did so was because my restaurant review script was no longer supported and had some ginormous security holes. It was open to all kinds of cross-site script injection and it was becoming a one to two hour a day chore to keep it running.

The new solution (WordPress) is fabulous, but now I have a couple hundred inbound links that are broken. Trying to get all of the links updated by the other sites was a losing proposition, so my next step was to put some 301 redirects into my friendly neighborhood .htaccess file and transfer all the link love to the new pages.

Easy (normal) 301 redirects via .htaccess
Normally, a 301 redirect in your .htaccess file would look like this:
Redirect 301 /old/url.shtml http://domain.com/new/filename
or if we’re being fancy…
RewriteEngine on
RewriteBase /
RewriteRule ^old/url.shtml$ new/filename [R=301,L]

Normally, the examples above are perfect for redirecting incoming links from old, defunct pages to the new, correct location of the file. The problem I ran into is that my pages were dynamically generated; i.e., they all shared the same URL, and which review was presented to the user was determined by an argument passed in the URL after the file extension.
http://www.domain.com/cgi-bin/script.cgi?review=bobs_shrimp_hut

To address this, I figured I would just [...]

Popularity: 33% [?]

Continue Reading

SEO 101: Google Revelations

SEO 101: Google Revelations

Posted on 26. Sep, 2008 by Carolyn Shelby.

0

Brian, David and I discuss two Google Webmaster Central Blog posts and the impact of those announcements on how we build sites, review our stats and logs, and how we deal with clients.

Specifically, we discuss:

In a nutshell, Google says they pull “important” terms from surrounding pages and use them to populate search boxes and other forms in an effort to get more content. Some of the terms they pull don’t seem like things normal people would be searching for, so we’re not sure how exactly they decide what terms to try or not try. You should be able to scan through your access logs and pick out examples of the bot filling in forms to see for yourself.

As for the 180 degree flip on dynamic URLs vs. static URLs, we’re pretty much in agreement that it’s not a green light to shut off URL rewriting or stop doing “pretty URLs”. Pretty URLs enhance the user experience, and in cases where you have an existing web site that is already turning ugly, dynamic URLs into pretty static strings, you should DEFINITELY not deviate from the status quo. Changing all of your existing URLs will cause a horrendous drop in traffic while the engines try to figure out what you’ve done and get everything sorted out.

Download SEO 101: Google Revelations
Originally aired on Webmaster Radio on 9/24/2008

Popularity: 53% [?]

Continue Reading