[svlug] gotten myself in trouble with permalinks,
Kellner, Peter
Peter at PeterKellner.net
Sat Mar 25 23:51:47 PST 2006
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?
-----Original Message-----
From: Tin Le [mailto:tin at le.org]
Sent: Saturday, March 25, 2006 10:46 PM
To: Kellner, Peter
Cc: svlug at lists.svlug.org
Subject: Re: [svlug] gotten myself in trouble with permalinks,
> I use wordpress 2. for my blog and want (have to) change my directory
> structure. Currently, when anyone references a blog posting they do
it
> with something like:
>
> http://peterkellner.net/?p=23
>
> Currently wordpress is setup so that wordpress is in the
> peterkellner.net/wp directory but I have the options set to tell it
the
> homoe of my blog is peterkellner.net.
>
> The problem is, when I change it, the link becomes
> http://peterkellner.net/wp/?p=23. I don't really care about the extra
> wp but my problem is I have lots of people who have linked to the
> original name.
>
> My question is, I'm hoping there is some unix wizardry that I can do
> such that when people press the original one, they get redirected to
my
> new link. (which may have a completely different name, not just an
extra
> wp in there).
>
> Wordpress does lots with my .htaccess file and all looks like greek to
> me.
>
If you are running your own Apache server and can make changes to
httpd.conf, mod_rewrite is your friend.
Turn it on.
LoadModule rewrite_module modules/mod_rewrite.so
Then the following rule should do it.
RewriteCond %{HTTP_HOST} ^peterkellner.net$
RewriteRule ^/wp/(.*) http://peterkellner.net/$1 [R,L]
Then service httpd reload to reread httpd.conf
Tin Le
--
http://tin.le.org
Tin Le - tin at le.org
Firewall and Security Consulting
More information about the svlug
mailing list