Forum Moderators: phranque

Message Too Old, No Replies

Redirecting entire folder to single wordpress article

...the "?" seems to be causing a problem....

         

sandpetra

3:35 am on Feb 9, 2007 (gmt 0)

10+ Year Member



I've just used the same method to successfully redirect an entire folder to a single .htm file but when i try the same to a wordpress article it seems to choke - I'm an apache newbie - total novice.

This is what I have:

RedirectMatch (.*)/ http://www.example.co.uk/my-blog/?p=52

but in the browser i get:

http://www.example.co.uk/my-blog/%3fp=52

which is obviously wrong. Any quick help much appreciated!

[edited by: jdMorgan at 3:46 am (utc) on Feb. 9, 2007]
[edit reason] example.co.uk [/edit]

jdMorgan

3:48 am on Feb 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try prefixing the "?" with a backslash -- "\?" and if that doesn't work, use mod_rewrite instead.

"%3f" is simply a hex-encoded question mark.

Jim

sandpetra

4:42 am on Feb 9, 2007 (gmt 0)

10+ Year Member



Sorry nope - now I get "%5c%3fp=52" instead of /?p=52

sandpetra

4:45 am on Feb 9, 2007 (gmt 0)

10+ Year Member



and I've not got access to mod rewrite on this server (I asked) - am i stuffed?

jdMorgan

2:41 pm on Feb 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With that host, I'm afraid so...

Jim

sandpetra

3:52 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



B*gger! I've actually moved to another host so I can start using Joomla etc but it is a pain with an old site like the one I mention. I'll just redirect them to a .htm file for the present.

Big thanks.