One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2006 Nov 11 - Sat

Apache Rewrite

After taking a look at Google's Webmaster Tools over a few days, I have come to the conclusion that Google doesn't crawl cgi-bin type things. So David Wheeler's rewrite page that I had come across a while back finally makes sense. The page url's need to be modifed to turn things into a seemingly standard directory structure.

Here is my version of a section of the Apache configuration file to handle the rewrites found anywhere within my /blog subdirectory:

  RewriteLogLevel 0
  RewriteLog /var/log/httpd/rewrite.log

<Directory "/var/www/html/blog">
  AddHandler cgi-script .cgi
  Options +ExecCGI
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !-f
  RewriteCond %{REQUEST_URI} !-d
  RewriteRule ^(.*)$ /cgi-bin/blosxom.cgi/$1 [L,QSA]
</Directory>

The first two lines helped figure out why the rewrites weren't working. By setting RewritelogLevel to a non-zero value, of which I used a value of 4, log statements are written to the directory indicated by RewriteLog. It turned out that my rewrite rule becomes '^(.*)$' rather than Wheeler's '^/(.*)$'.

This only required one configuration change in the blosxom.cgi file:

$url = "http://www.oneunified.net/blog/";



Blog Content ©2012
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 500-7292
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

twitter
View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



November
Su Mo Tu We Th Fr Sa
     
10
   


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge
Max Dama

2006
Months
Nov




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.