Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Redirect OLD URLs *.php?page=* to new URLs */page/*

Redirect OLD URLs *.php?page=* to new URLs */page/*

8:35 am on Oct 1, 2012 (gmt 0)

New User

5+ Year Member

joined:Feb 6, 2010
posts: 15
votes: 0


My old website was in .php and currently, I am using WordPress script. I would like to redirect all my OLD URLs to new URLs.

My OLD site URL looks like this:
www.domainname.com/testimonials.php?page=4 and so on

Another URLs OLD:
... and so on

Now the structure has been changed with WordPress. Now the above URLs look like.
... and so on

Another URLs NEW:
... and so on

My all old URLs are in Google and other search engines. I would like to redirect them (all my OLD URLs) to new URLs. E.g. testimonials.php?page=2 to testimonials/page/2 etc

Please help me to redirect them through .htaccess

My current .htaccess looks like as below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Thanks in advance.
10:27 am on Oct 1, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
votes: 0

This question (or a close relation) is asked most weeks here.

If the new URL re-uses elements from the old URL you can do it with simple rules, so you'll be able to do that with many of the URLs.

Where the old URLs have no such re-usable features you should either:
- use a custom Wordpress redirect plugin or extension, or
- rewrite (that's internally rewrite, not redirect) all requests for old URLs to a simple PHP script that contains an array of old and new URLs, looks up the new URL and sends a 301 HEADER to the new URL, or sends a 404 HEADER if the old URL does not exist (i.e. for all unused ID numbers).
1:05 pm on Oct 1, 2012 (gmt 0)

New User

5+ Year Member

joined:Feb 6, 2010
posts: 15
votes: 0

Thanks so much for your reply. Its done by using the Redirection plugin

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members