htaccess rewrite conversion ?

George nginx-forum at nginx.us
Tue Nov 10 11:32:50 MSK 2009


I'm thinking of converting a forum site from apache to nginx but they have this .htaccess in root of their account and not sure if there's a nginx equivalent ??

Any help would be appreciated :)

htaccess contents are:


RewriteEngine on
ErrorDocument 404 /foro/404.php
RedirectMatch 301 "^/forum/?$" "http://www.domain.com/foro"


order allow,deny
allow from all


deny from 201.xxx.xx.xxRewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://domain.com$      
RewriteCond %{HTTP_REFERER} !^http://jorn.domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://jorn.domain.com$      
RewriteCond %{HTTP_REFERER} !^http://webring.domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://webring.domain.com$      
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.domain.com$      
RewriteCond %{HTTP_REFERER} !^http://www.jorn.domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.jorn.domain.com$      
RewriteCond %{HTTP_REFERER} !^http://www.webring.domain.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.webring.domain.com$      
RewriteRule .*\.(jpg|JPG|JPEG|GIF|jpeg|gif|png|bmp|mov|mpeg|mpg)$ http://www.domain.com 

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,21744,21744#msg-21744






More information about the nginx mailing list