[svlug] gotten myself in trouble with permalinks,

Kellner, Peter Peter at PeterKellner.net
Sun Mar 26 18:01:40 PST 2006


Thanks for everyones help.  I'm not quite there yet.  (though just a
little smarter on reg. exp.  I did download the tool and it appears
[?]p=24 matches ?p=24 so with that in mind I'm trying to get this:

http://test.cyclohamster.com/?p24

to redirect to

http://test.cyclohamster.com/xxx/bearflag.jpg

I created a one line .htaccess file (after reading
http://www.sitepoint.com/print/guide-url-rewriting 

  
RewriteRule [?]p24 /xxx/bearflag.jpg

When I run the http://test.cyclohamster.com/?p24 it just gives me the
directory of the site.

Thanks again for sticking with me on this.  I'm hoping what I'm trying
to do is very simple but it's not seeming that way.

-Peter  (BTW, the URL's I've mentioned above are the real URL's, try
them)

-----Original Message-----
From: ettinger at gmail.com [mailto:ettinger at gmail.com] On Behalf Of
Anthony Ettinger
Sent: Sunday, March 26, 2006 2:38 PM
To: Kellner, Peter
Cc: tin at le.org; svlug at lists.svlug.org
Subject: Re: [svlug] gotten myself in trouble with permalinks,

with dh, you can use mod_rewrite rules in .htaccess.

On 3/25/06, Kellner, Peter <Peter at peterkellner.net> wrote:
>
> 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
>
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
>
>


--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html




More information about the svlug mailing list