Welcome! Log In Create A New Profile

Advanced

Moved MediaWiki and redirect search result links to new MediaWiki correctly

Posted by mythenhacker 
Moved MediaWiki and redirect search result links to new MediaWiki correctly
August 30, 2016 06:25PM
Hello everyone,

I moved my MediaWiki to a new Domain (and replaced the old one with Wordpress).

Now I would like to redirect all old search result links in Google search like sampleoldsite.com/oldwiki/samplearticle to
samplenewsite.com/newwiki/samplearticle (the article names itself stay the
same).

I'm trying things like

server {
[..]
server_name sampleoldsite;

location /oldwiki/ {
rewrite samplenewsite.com/wiki/([^\?]*) /w/index.php?title=$1&$args last
}
}

(/w/ is the installation directory of my MediaWiki installtion.)

but always get "Page not found" and redirecting to totally different page.
I Wrote:
-------------------------------------------------------

> I'm trying things like
>
> server {
> [..]
> server_name sampleoldsite;

server_name is "sampleoldsite.com" of course. So, this is not the cause.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 277
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready