[thelist] New lister question about .htaccess and redirects

Kelly Hallman khallman at wrack.org
Tue Sep 23 03:08:47 CDT 2003


On Tue, 23 Sep 2003, John C Bullas wrote:
> I have files of the form <single a-z character>.htm in one directory 
> (http://www.ime.org.uk/ime/) and want to put a Redirect Permanent regexp 
> in my root .htaccess  to route all calls for <single a-z character>.html 
> ANYWHERE AND <single a-z character>.htm anywhere but 
> http://www.ime.org.uk/ime/ to the <single a-z character>.htm in directory 
> (http://www.ime.org.uk/ime/)

I assume this is what you're looking for:

RewriteEngine On
RewriteRule /([a-z]).html?$ /ime/$1.htm

> ...the Apache white screen of death (500 error)...

Use of mod_rewrite directives from .htaccess will need to be enabled or it
will likely produce a 500 error if you put them in an .htaccess file.

-- 
Kelly Hallman
http://wrack.org/





More information about the thelist mailing list