how to change apache .htaccess to nginx rewrite

Ranger Angel lists at ruby-forum.com
Mon Apr 5 05:20:59 MSD 2010


apache .htaccess
-----------------------------

ExpiresActive On
ExpiresByType image/gif "access 1 week"
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType text/js "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType application/x-javascript "access 1 week"

ErrorDocument 404 http://www.domain.com/

RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^.*$ - [L]
RewriteRule ^index.php$ http://%{http_host}/vb/ [R=301,L]

RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*) http://www.domain.com/vb/$1 [L,R=301]

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$
vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list