WordPress.org

Ready to get started?Download WordPress

Forums

Htaccess redirect from mediawiki to wordpress (2 posts)

  1. guttermouth
    Member
    Posted 9 months ago #

    Hello,

    I need your help. I am facing some problems. I migrated my mediawiki to wordpress. The normal 301 redirect worked quite well but know I figured out, that some previous links still do not work.

    How do I redirect the old link:

    index.php5?title=TITLE

    to the new link

    index.php?pagename=TITLE

    I tried to add this to my htaccess, but it did not work:

    RewriteRule ^index\.php5\?title=(.+?)$ index.php?pagename=$1 [NC,L]

    Thats what my htaccess looks like at the moment:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php5\?title=(.+?)$ index.php?pagename=$1 [NC,L]
     RewriteRule ^index\.php$ - [L]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]

    Please help me I really don't know what to do.

    Thanks for your help in advance

    guttermouth

  2. guttermouth
    Member
    Posted 9 months ago #

    Hey,

    I just solved the problem. The solution is the following:

    RewriteCond %{REQUEST_URI} ^/index.php5 [NC]
    RewriteCond %{QUERY_STRING} ^title=(.*)
    RewriteRule (.*) http://website.com/index.php?pagename=%1? [R=301,L]

    But still I am facing another problem.

    I also had some symbols like ,()=?!. within my link. I also need to redirect this. Does anyone of you know how to do a redirection with symbols within the url?

    Thanks

Reply

You must log in to post.

About this Topic