regex - htaccess rewrite rule adding and removing parts plus 301 redirect -


I have just changed a phpNuke CMS to WordPress. After the conversion was done, I saw two urls for each post. This is my conversion:

  www.domain.com/modules.php?name=News&file=article&sid=1  

Unfortunately, this way Another URL is:

  www.domain.com/1.htm  

Now I need a rewrite rule which is "modules.php Say it? 301 redirects at the same time by removing name = news and file = article and sid = "and" .htm "

Now I use a quick and dirty solution like this:

  Redirectable / 8.htm http://domain.com/modules.php?name= News & amp; file = article & amp; sid = 8  

It's quick and easy, but with 1600 posts, it's far from elegant and this page may be slow.

Any help would be greatly appreciated!

You can use regex in your rule and only one rule to handle all of these URLs Is:

Redirect 301 ^ / ([0- 9] +). Html? $ /modules.php?name=News&file=article&sid=$1

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -