全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1864|回复: 3

大侠,帮忙把apache的伪静态转为nginx。谢谢

[复制链接]
发表于 2012-7-25 19:13:13 | 显示全部楼层 |阅读模式

  1. <VirtualHost *:80>
  2. DocumentRoot "/home/wwwroot/www.bmxxt.com/city/as"
  3. ServerName www.bmxxt.com/city/as
  4. <Directory "/home/wwwroot/www.bmxxt.com/city/as">            
  5. Options FollowSymLinks IncludesNOEXEC Indexes
  6. DirectoryIndex index.html index.php
  7. AllowOverride None
  8. Order Deny,Allow
  9. Allow from all
  10. </Directory>
  11. <IfModule mod_rewrite.c>
  12. RewriteEngine On
  13. RewriteRule ^(.*)/information-id-([0-9]+)\.html$ $1/information\.php\?id=$2
  14. RewriteRule ^(.*)/category-catid-([0-9]+)\.html$ $1/category\.php\?catid=$2
  15. RewriteRule ^(.*)/category-catid-([0-9]+)-page-([0-9]+)\.html$ $1/category\.php\?catid=$2&page=$3

  16. RewriteRule ^(.*)/news\.html$ $1/news\.php
  17. RewriteRule ^(.*)/news-id-([0-9]+)\.html$ $1/news\.php\?id=$2
  18. RewriteRule ^(.*)/news-catid-([0-9]+)\.html$ $1/news\.php\?catid=$2
  19. RewriteRule ^(.*)/news-catid-([0-9]+)-page-([0-9]+)\.html$ $1/news\.php\?catid=$2&page=$3

  20. RewriteRule ^(.*)/corporation\.html\?*(.*)$ $1/corporation\.php
  21. RewriteRule ^(.*)/corporation-areaid-([0-9]+)\.html$ $1/corporation\.php\?areaid=$2
  22. RewriteRule ^(.*)/corporation-page-([0-9]+)\.html$ $1/corporation\.php\?page=$2
  23. RewriteRule ^(.*)/corporation-catid-([0-9]+)\.html$ $1/corporation\.php\?catid=$2
  24. RewriteRule ^(.*)/corporation-areaid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?areaid=$2&page=$3
  25. RewriteRule ^(.*)/corporation-catid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&page=$3
  26. RewriteRule ^(.*)/corporation-catid-([0-9]+)-areaid-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&areaid=$3
  27. RewriteRule ^(.*)/corporation-catid-([0-9]+)-areaid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&areaid=$3&page=$4

  28. RewriteRule ^(.*)/sitemap\.html$ $1/about\.php\?part=sitemap
  29. RewriteRule ^(.*)/aboutus\.html$ $1/about\.php\?part=aboutus
  30. RewriteRule ^(.*)/aboutus-id-([0-9]+)\.html$ $1/about\.php\?part=aboutus&id=$2
  31. RewriteRule ^(.*)/announce\.html$ $1/about\.php\?part=announce&id=$2
  32. RewriteRule ^(.*)/faq\.html$ $1/about\.php\?part=faq
  33. RewriteRule ^(.*)/faq-id-([0-9]+)\.html$ $1/about\.php\?part=faq&id=$2
  34. RewriteRule ^(.*)/friendlink\.html$ $1/about\.php\?part=friendlink

  35. RewriteRule ^(.*)/space/([a-z0-9\-\_]+)/$ $1/space\.php\?user=$2

  36. RewriteRule ^(.*)/store-([0-9]+)/$ $1/store\.php\?uid=$2
  37. RewriteRule ^(.*)/store-([0-9]+)/album.html$ $1/store\.php\?uid=$2&part=album
  38. RewriteRule ^(.*)/store-([0-9]+)/album-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=album&page=$3
  39. RewriteRule ^(.*)/store-([0-9]+)/contactus.html$ $1/store\.php\?uid=$2&part=contactus
  40. RewriteRule ^(.*)/store-([0-9]+)/comment.html$ $1/store\.php\?uid=$2&part=comment
  41. RewriteRule ^(.*)/store-([0-9]+)/comment-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3
  42. RewriteRule ^(.*)/store-([0-9]+)/comment-good-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=good
  43. RewriteRule ^(.*)/store-([0-9]+)/comment-soso-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=soso
  44. RewriteRule ^(.*)/store-([0-9]+)/comment-bad-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=bad
  45. RewriteRule ^(.*)/store-([0-9]+)/guestbook.html$ $1/store\.php\?uid=$2&part=guestbook
  46. RewriteRule ^(.*)/store-([0-9]+)/goods.html$ $1/store\.php\?uid=$2&part=goods
  47. RewriteRule ^(.*)/store-([0-9]+)/([a-z]+)/page-([0-9]+).html$ $1/store\.php\?uid=$2&part=$3&page=$4
  48. RewriteRule ^(.*)/store-([0-9]+)/document-typeid-([0-9]+).html$ $1/store\.php\?uid=$2&part=document&typeid=$3
  49. RewriteRule ^(.*)/store-([0-9]+)/document-id-([0-9]+).html$ $1/store\.php\?uid=$2&part=document&id=$3

  50. </IfModule>
  51. </VirtualHost>

  52. <VirtualHost *:80>
  53. DocumentRoot "/home/wwwroot/www.bmxxt.com/city/ay"
  54. ServerName www.bmxxt.com/city/ay
  55. <Directory "/home/wwwroot/www.bmxxt.com/city/ay">            
  56. Options FollowSymLinks IncludesNOEXEC Indexes
  57. DirectoryIndex index.html index.php
  58. AllowOverride None
  59. Order Deny,Allow
  60. Allow from all
  61. </Directory>
  62. <IfModule mod_rewrite.c>
  63. RewriteEngine On
  64. RewriteRule ^(.*)/information-id-([0-9]+)\.html$ $1/information\.php\?id=$2
  65. RewriteRule ^(.*)/category-catid-([0-9]+)\.html$ $1/category\.php\?catid=$2
  66. RewriteRule ^(.*)/category-catid-([0-9]+)-page-([0-9]+)\.html$ $1/category\.php\?catid=$2&page=$3

  67. RewriteRule ^(.*)/news\.html$ $1/news\.php
  68. RewriteRule ^(.*)/news-id-([0-9]+)\.html$ $1/news\.php\?id=$2
  69. RewriteRule ^(.*)/news-catid-([0-9]+)\.html$ $1/news\.php\?catid=$2
  70. RewriteRule ^(.*)/news-catid-([0-9]+)-page-([0-9]+)\.html$ $1/news\.php\?catid=$2&page=$3

  71. RewriteRule ^(.*)/corporation\.html\?*(.*)$ $1/corporation\.php
  72. RewriteRule ^(.*)/corporation-areaid-([0-9]+)\.html$ $1/corporation\.php\?areaid=$2
  73. RewriteRule ^(.*)/corporation-page-([0-9]+)\.html$ $1/corporation\.php\?page=$2
  74. RewriteRule ^(.*)/corporation-catid-([0-9]+)\.html$ $1/corporation\.php\?catid=$2
  75. RewriteRule ^(.*)/corporation-areaid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?areaid=$2&page=$3
  76. RewriteRule ^(.*)/corporation-catid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&page=$3
  77. RewriteRule ^(.*)/corporation-catid-([0-9]+)-areaid-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&areaid=$3
  78. RewriteRule ^(.*)/corporation-catid-([0-9]+)-areaid-([0-9]+)-page-([0-9]+)\.html$ $1/corporation\.php\?catid=$2&areaid=$3&page=$4

  79. RewriteRule ^(.*)/sitemap\.html$ $1/about\.php\?part=sitemap
  80. RewriteRule ^(.*)/aboutus\.html$ $1/about\.php\?part=aboutus
  81. RewriteRule ^(.*)/aboutus-id-([0-9]+)\.html$ $1/about\.php\?part=aboutus&id=$2
  82. RewriteRule ^(.*)/announce\.html$ $1/about\.php\?part=announce&id=$2
  83. RewriteRule ^(.*)/faq\.html$ $1/about\.php\?part=faq
  84. RewriteRule ^(.*)/faq-id-([0-9]+)\.html$ $1/about\.php\?part=faq&id=$2
  85. RewriteRule ^(.*)/friendlink\.html$ $1/about\.php\?part=friendlink

  86. RewriteRule ^(.*)/space/([a-z0-9\-\_]+)/$ $1/space\.php\?user=$2

  87. RewriteRule ^(.*)/store-([0-9]+)/$ $1/store\.php\?uid=$2
  88. RewriteRule ^(.*)/store-([0-9]+)/album.html$ $1/store\.php\?uid=$2&part=album
  89. RewriteRule ^(.*)/store-([0-9]+)/album-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=album&page=$3
  90. RewriteRule ^(.*)/store-([0-9]+)/contactus.html$ $1/store\.php\?uid=$2&part=contactus
  91. RewriteRule ^(.*)/store-([0-9]+)/comment.html$ $1/store\.php\?uid=$2&part=comment
  92. RewriteRule ^(.*)/store-([0-9]+)/comment-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3
  93. RewriteRule ^(.*)/store-([0-9]+)/comment-good-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=good
  94. RewriteRule ^(.*)/store-([0-9]+)/comment-soso-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=soso
  95. RewriteRule ^(.*)/store-([0-9]+)/comment-bad-page-([0-9]+).html$ $1/store\.php\?uid=$2&part=comment&page=$3&type=bad
  96. RewriteRule ^(.*)/store-([0-9]+)/guestbook.html$ $1/store\.php\?uid=$2&part=guestbook
  97. RewriteRule ^(.*)/store-([0-9]+)/goods.html$ $1/store\.php\?uid=$2&part=goods
  98. RewriteRule ^(.*)/store-([0-9]+)/([a-z]+)/page-([0-9]+).html$ $1/store\.php\?uid=$2&part=$3&page=$4
  99. RewriteRule ^(.*)/store-([0-9]+)/document-typeid-([0-9]+).html$ $1/store\.php\?uid=$2&part=document&typeid=$3
  100. RewriteRule ^(.*)/store-([0-9]+)/document-id-([0-9]+).html$ $1/store\.php\?uid=$2&part=document&id=$3

  101. </IfModule>
  102. </VirtualHost>



复制代码

评分

参与人数 1威望 +5 收起 理由
回味依旧 + 5 神马都是浮云 回加个

查看全部评分

发表于 2012-7-25 20:24:21 | 显示全部楼层
 楼主| 发表于 2012-7-25 20:24:43 | 显示全部楼层
回味依旧 发表于 2012-7-25 20:24
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/  求加分

这个不可以哈
发表于 2012-7-25 20:37:44 | 显示全部楼层
qqab 发表于 2012-7-25 20:24
这个不可以哈

额   好吧  我也不怎么会 等待其他大牛了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-21 16:21 , Processed in 0.169607 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表