# Who Can Help me switch a Nginx rewrite rules

**URL:** <https://www.ruby-forum.com/t/who-can-help-me-switch-a-nginx-rewrite-rules/196290>\
**Category:** NGINX\
**Created:** [October 11, 2010, 12:01am UTC](https://www.ruby-forum.com/t/who-can-help-me-switch-a-nginx-rewrite-rules/196290 "2010-10-11T00:01:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cw723](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3ab097/32.png) [@cw723](https://www.ruby-forum.com/u/cw723)\
**Post date:** [October 11, 2010, 12:01am UTC](https://www.ruby-forum.com/t/who-can-help-me-switch-a-nginx-rewrite-rules/196290/1 "2010-10-11T00:01:52Z")

</div>

RewriteRule  
/(?:attachment)/._.(?:gif|jpg|jpeg|png|psd|wav|mid|asf|wma|wmv|rm|bmp|exe|rar|zip|msi|ram|doc|xls|mp3|mpg|swf|ra|mp4|rmp|avi|tar|flv|rmvb|torrent)  
/images/err.gif [I,O]  
RewriteRule ^(._)-htm-(._)$ $1.php?$2  
RewriteRule ^(._)/simple/([a-z0-9\_]+.html)._$ $1/simple/index.php?$2  
RewriteRule ^(._)/([a-zA-Z]+).html._$ $1/$2.php  
RewriteRule ^(._)/sitemap.xml$ $1/sitemap.php  
RewriteRule ^(._)/([a-zA-Z]+)-(._.html._)$ $1/$2.php?$3  
RewriteRule ^/([a-zA-Z]+).html._$ /$1.php  
RewriteRule ^(._)/sitemap.xml$ $1/sitemap.php  
RewriteRule ^(._)/archiver/ /simple/ [R]  
RewriteRule ^(._)/tid-(\d+).html /simple/index.php?t$2.html [R]  
RewriteRule ^(._)/fid-(\d+).html /simple/index.php?f$2.html [R]  
RewriteRule ^(._)/fid-(\d+)-(\d+)-1.html /simple/index.php?f$2.html  
[R]  
RewriteRule ^(._)/forum-(\d+)-(\d+).html$ $1/thread.php?fid=$2 [R]  
RewriteRule ^(._)/thread-(\d+)-(\d+)-(\d+).html$ $1/read.php?tid=$2  
[R]  
RewriteRule ^(._)-htm-(._)$ $1.php?$2  
RewriteRule ^(._)simple/([t|f].+).html$ /simple/index.php?$2.html  
[NC,L]

WHo Can help me switch  
I just use the switch website  
But RewriteRule ^(._)/([a-zA-Z]+)-(._.html.\*)$ $1/$2.php?$3  
This rules still cant use

thank you

Posted at Nginx Forum:

> **[Who Can Help me switch a Nginx rewrite rules](https://forum.nginx.org/read.php?2,139096,139096#msg-139096)**
>
> RewriteRule /(?:attachment)/.\*\\.(?:gif|jpg|jpeg|png|psd|wav|mid|asf|wma|wmv|rm|bmp|exe|rar|zip|msi|ram|doc|xls|mp3|mpg|swf|ra|mp4|rmp|avi|tar|flv|rmvb|torrent) /images/err.gif \[I,O\] RewriteRule ^(.\*)-htm-(.\*)$ $1.php?$2 RewriteRule...
