Dynamic Web Pages - Forced Redirect 301
I created this site as I'd outgrown my personal blogging site. My personal blog was created to keep track of my running training but as time went by I included other topics, such as Drupal and C++ programming stuff.
I was surprised by the amount of hits I was receiving and most were as a result of the technical stuff. As you can imagine my web pages were well and truly entrenched within the Google, Yahoo search engine system.
I had no choice, I had to create another site more suited to computer technical stuff and move away from the 'only' blogging regime.
Transferring the IT stuff from my old site to the new site was/is a manual process, there aren't that many IT related entries but I still wanted to keep them. I'm not bothering with the bulk of the comments.
After copying the web pages relating to the Wordpress to Drupal converter and copying the download page and associated download files, I was then left with, "how will the search engines find me". This is where the forced re-directs come in.
In my case I only wanted to redirect certain pages from my old site (http://superjacent.net/?q=node/nnn) to the corresponding page at this site (http://prime357.org/node/nnn). After many hours scouring the web I finally came across this thread which explained how this is all achieved.
Remember, I'm re-directing certain dynamic web pages from the old site (Drupal) to my new site (Drupal). Edit the .htaccess file at the Drupal root of the old site. Place these lines relatively early in the file or at least before other 'clean url' type RewriteRules commence.
# 3 Apr 2008
# Download page - converter program
RewriteCond %{QUERY_STRING} ^q=node/509$
RewriteRule ^$ http://prime357.org/node/23? [R=301,L]
# Converter manual
RewriteCond %{QUERY_STRING} ^q=node/518$
RewriteRule ^$ http://prime357.org/node/1? [R=301,L]
The #'s are comment lines only.
I've displayed two RewriteCond and RewriteRule's. These effectively are 'hard-coded'. If we deal with the first one, all that happens is that if 'q=node/518' is the requested page then the following line re-directs the page to 'node/1' of the new site (this site).
The [R=301,L] merely tells the search engines that this is a permanent re-direct. Apparently, in time, the search engines will update their search database with the new information, as provided by our RewriteRule. The [L] merely means it's the last RewriteRule for the given condition.
Clear as mud.


Recent comments
1 hour 8 min ago
1 day 55 min ago
1 day 6 hours ago
1 day 16 hours ago
1 day 17 hours ago
3 weeks 6 days ago
3 weeks 6 days ago
4 weeks 1 hour ago
10 weeks 1 day ago
11 weeks 4 days ago