I want to rename the URLS www.example.com/first/test-one/ to www.example.com/second/test-one/. At present there is no such page with URL www.example.com/second/test-one/. In this process the content of the original page should appear with www.example.com/second/test-one/ URL. Note that there are multiple pages as www.example.com/first/test-two/,www.example.com/first/test-three/ and so on. Here is my code:
RewriteEngine On
RewriteBase /
RewriteRule ^first/(.*) http://example.com/second/$1 [QSA,L]
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Thanks in advance.
Just go through following link
http://codex.wordpress.org/Using_Permalinks