I want to redirect a page of my wordpress website to another URL permanently. Please help me how can i do it using .htaccess
Try this code in your .htaccess file.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]
RewriteEngine on
rewriterule ^old-page.php(.*)$ http://www.YourDomain.com/new-page.php$1 [r=301,nc]
Or you can also use url rewrite tool online
http://www.generateit.net/mod-rewrite/index.php
I’d do it with a 301 redirect.
Redirect 301 /this-page.html /that-page.html
or
Redirect 301 /this-page.html http://www.example.com/that-page.html
The path to the old URL should always be given as a local path. The new URL can either be a local path, or a full URL to another domain.
More detailed explanation: http://www.rapidtables.com/web/dev/htaccess-redirect.htm
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.