[svlug] gotten myself in trouble with permalinks,

Kellner, Peter Peter at PeterKellner.net
Sun Mar 26 08:50:47 PST 2006


Could you give a sample 1 line I could put in  my .htaccess that would
redirect a specific query to another query.  I tried making some
Redirect's to the bottom of the .htaccess  based on what you have but
they all stopped my web server from working.

thanks



-----Original Message-----
From: Tin Le [mailto:tin at le.org] 
Sent: Sunday, March 26, 2006 12:51 AM
To: Kellner, Peter
Cc: tin at le.org; svlug at lists.svlug.org
Subject: RE: [svlug] gotten myself in trouble with permalinks,

> It's an apache server but it's hosted at DreamHost.com so I don't
think
I have much control.  I only have about 10 links to do.  Is there any
way to do them by hand?

You could put Redirect in .htaccess although I personally don't like to
use .htaccess.  It's a performance hit on the webserver.

So...

1. AllowOverride has to be set to something other than None,
   preferably FileInfo in httpd.conf
2. create .htaccess in top level directory where you want to do
    redirects.  /wp in your case.
3. in .htaccess put the following.

Redirect permanent /wp/ /

Also look at docs for RedirectMatch if you want to use regex for more
complex rules.

I'd avoid .htaccess if at all possible, but if you gotta, you gotta.

Tin Le
-- 
http://tin.le.org
Tin Le - tin at le.org
Firewall and Security Consulting








More information about the svlug mailing list