Search code examples
wordpress.htaccesspermalinks

.Htaccess Redirect Rule


Need help with an 301 htaccess redirect rule doing the following for all the files in these paths: I want to redirct this URLs http://www.example.org/archives/xxxxx to http://www.example.org/?=xxxxx

Have to remove /archives and add ?= to URL with random numbers got form old URLs.

(xxxxx is random number )

Really appreciate for the help.


Solution

  • Thank for your answer Starkeen but it's not working. I got the solution. Please add the following rule to your .htaccess file.

    RewriteRule ^archives\/(.*)$ "http\:\/\/www\.example.com\.com\/?p=$1" [R=301,L]