Forum of Apache users Forum Index Forum of Apache users
Discussions of software for tuning the Apache web servers
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

301 redirect Problem

 
Post new topic   Reply to topic    Forum of Apache users Forum Index -> ApacheConf
View previous topic :: View next topic  
Author Message
danrinkes



Joined: 19 Apr 2010
Posts: 1

PostPosted: Mon Apr 19, 2010 9:17 pm    Post subject: 301 redirect Problem Reply with quote

Hi,

I am an apache novice, but I've been given the task of making some redirects on a MediaWiki site that I manage. To give a short background, we had a number of URLs that were aliased to the same location, and now we're migrating to a single URL. So, I've been tasked with redirecting the existing URLs to the new "unified" one.

In my .htaccess file, I have some entries like this

RewriteCond %{HTTP_HOST} ^www.oldurl.com$ [NC]
RewriteRule ^(.*)$ http://www.newurl.com/$1 [R=301,L]

As with most mediawikis, the format of the url is
http;//www.oldurl.com/index.php?title=PageTitle

My setup works in most cases the /index.php?title=PageTitle gets appended to the new URL and everything works great.

My problem occurs with mediawiki pages that have special punctuation in them, such as a question mark or an apostrophe.

For example, a wiki page called
Is_this_a_question?
gets converted by mediawiki to be
Is_this_a_question%3F

The problem is that my redirect does not include the %3F. I've seen similar cases where an apostrophe gets converted to %2527.

Can someone give me some direction as to how to modify my .htaccess file to handle these cases?

Thanks,
Dan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forum of Apache users Forum Index -> ApacheConf All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Anti Bot Question MOD - phpBB MOD against Spam Bots