How to redirect entire wordpress folder with dynamic URLs to a single page

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

Read More

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.

Related posts

Leave a Reply

3 comments

  1. 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

  2. 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….

  3. 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