Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Moved MediaWiki and redirect search result links to new MediaWiki correctly

$
0
0
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.

Viewing all articles
Browse latest Browse all 4759

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>