2
votes

I had old wordpress blog which was under mywebsite.com/wordpress

Now I have moved this blog but I would like to redirect the entire wordpress folder to a single category page mywebsite.com/category/test

The problem is that I don't know how to redirect dynamic pages (all at once) such as
wordpress/?p=1
wordpress/?p=2
wordrpess/?page_id=1362

and others.

I don't need a page to page redirect, just an entire redirect from the wordpress folder to one single category page.

3

3 Answers

1
votes

I see that you have used the .htaccess tag, so assume you have access to an .htaccess file.

Try this in .htaccess in the root of your website:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mywebsite\.com$
RewriteRule ^facts/(.*)$ http://mywebsite.com/category/test/ [R=permanent,L]

Let us know if that works!

EDIT: Add a ? to the end of the destination rule to strip the querystring info:

RewriteRule ^facts/(.*)$ http://mywebsite.com/category/test/? [R=permanent,L]

Ben

0
votes

I'm pretty sure that there's an option under dashboard-->settings-->general (maybe?) that allows you to designate your landing page! and that should redirect your site to that category page....

0
votes

In .htacess file To redirect the page

Redirect /themes_name/your_file.php /themes_name/your_file.php

First your old blog file path and second new blog file path