[svlug] gotten myself in trouble with permalinks,
Tin Le
tin at le.org
Sat Mar 25 22:46:25 PST 2006
> 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