A Plea For Tech Help

I’m not much of an Apache guru so I’m looking to the readership of Wizbang to help with a specialized modrewrite problem. I’ve got a directory called author of the root of all of the sites which contains two files – index.php and author.xml. Respectively they allow for author archives and author RSS feeds when passed the right variables.

What I’d like to do is show prettier URL’s that the server will then translate into the proper parameterized call. If you’re up for the challenge read on…

]]>< ![CDATA[

I’d like: https://wizbangblog.com/author/Kevin Aylward/ to actually load the following: https://wizbangblog.com/author/index.php?author=Kevin%20Aylward.

Also I’d like https://wizbangblog.com/author/Kevin Aylward/rss.xml to load the following: https://wizbangblog.com/author/author.xml?author=Kevin%20Aylward.

The only wrinkle is that I’d also like to use the solution on the subsites, which while they are addressed as third level domains (i.e. http://pop.wizbangblog.com/author/index.php?author=Kevin%20Aylward) are actually physically located in the directory structure under wizbangblog.com (ie. wizbangblog.com/pop/). I’m not sure that makes a difference, as each has their own .htaccess, but I wanted to give maximum detail.

Here is the current .htaccess. It’s basically just the Movable Type generated stuff to do dynamic publishing.

## %%%%%%% Movable Type generated this part; don’t remove this line! %%%%%%%
# Disable fancy indexes, so mtview.php gets a chance…
Options -Indexes +SymLinksIfOwnerMatch

# The mod_rewrite solution is the preferred way to invoke
# dynamic pages, because of its flexibility.

# Add mtview.php to the list of DirectoryIndex options, listing it last,
# so it is invoked only if the common choices aren’t present…

DirectoryIndex index.php index.html index.htm default.htm default.html default.asp /mtview.php

RewriteEngine on

# don’t serve mtview.php if the request is for a real directory
# (allows the DirectoryIndex lookup to function)
RewriteCond %{REQUEST_FILENAME} !-d

# don’t serve mtview.php if the request is for a real file
# (allows the actual file to be served)
RewriteCond %{REQUEST_FILENAME} !-f
# anything else is handed to mtview.php for resolution
RewriteRule ^(.*)$ /mtview.php [L,QSA]

# if mod_rewrite is unavailable, we forward any missing page
# or unresolved directory index requests to mtview
# if mtview.php can resolve the request, it returns a 200
# result code which prevents any 4xx error code from going
# to the server’s access logs. However, an error will be
# reported in the error log file. If this is your only choice,
# and you want to suppress these messages, adding a “LogLevel crit”
# directive within your VirtualHost or root configuration for
# Apache will turn them off.
ErrorDocument 404 /mtview.php
ErrorDocument 403 /mtview.php

## ******* Movable Type generated this part; don’t remove this line! *******

One question is whether the code should go above the MT section or within it. I’ve been wholly unsuccessful at adding a proper RewriteRule to that structure and having it do anything short of generating 500 errors.

Any modrewrite gurus in the house who can get this to work? If so let fly with you’re proposed solutions, and I’ll test them out. The working solution will be credited to whoever comes up with in an article to submitted for publication on Six Apart’s ProNet site.

Another Spring, Another DEA Agent Shooting Himself in Foot Post
"Family Fun" -- if you're the Manson family


  1. King of Fools April 11, 2006
  2. King of Fools April 11, 2006
  3. Kevin April 11, 2006
  4. McGehee April 11, 2006
  5. Kevin April 12, 2006
  6. ed April 12, 2006
  7. Kathy K April 12, 2006
  8. Kathy K April 12, 2006