problem with .htaccess

assassin85 nginx-forum at nginx.us
Fri Apr 23 01:57:55 MSD 2010


hello

i have a problem with .htaccess file not workin with nGinx

here is is code


RewriteEngine On
RewriteCond %{HTTP_HOST} !^vb.sitename.com
RewriteCond %{REQUEST_FILENAME} vb/
RewriteRule (.*) http://vb.dardarkom.com/$1 

RewriteRule ^page/(.*)$ index.php?cstart=$1 

RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 

RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$4&news_page=$2&cstart=$3 
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$2 
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$2&newsid=$3 
RewriteRule ^([^.]+)/([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2 

RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$1&cstart=$2 
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&news_page=$1 
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$1&newsid=$2 
RewriteRule ^([0-9]+)-(.*).html(/?)+$ index.php?newsid=$1 

RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2&day=$3 
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&day=$3&cstart=$4 

RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2 
RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&cstart=$3 

RewriteRule ^([0-9]{4})(/?)+$ index.php?year=$1 
RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ index.php?year=$1&cstart=$2 

RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 
RewriteRule ^tags/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=tags&tag=$1&cstart=$2 

RewriteRule ^user/([^/]*)/rss.xml$ engine/rss.php?subaction=allnews&user=$1 
RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 
RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 
RewriteRule ^user/([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 
RewriteRule ^user/([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 
RewriteRule ^user/([^/]*)/news/rss.xml(/?)+$ engine/rss.php?subaction=allnews&user=$1 

RewriteRule ^lastnews/(/?)+$ index.php?do=lastnews 
RewriteRule ^lastnews/page/([0-9]+)(/?)+$ index.php?do=lastnews&cstart=$1 

RewriteRule ^catalog/([^/]*)(/?)+$ index.php?catalog=$1 
RewriteRule ^catalog/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2 

RewriteRule ^newposts(/?)+$ index.php?subaction=newposts 
RewriteRule ^newposts/page/([0-9]+)(/?)+$ index.php?subaction=newposts&cstart=$1 

RewriteRule ^static/(.*).html(/?)+$ index.php?do=static&page=$1 

RewriteRule ^favorites(/?)+$ index.php?do=favorites 
RewriteRule ^favorites/page/([0-9]+)(/?)+$ index.php?do=favorites&cstart=$1 

RewriteRule ^rules.html$ index.php?do=rules 
RewriteRule ^statistics.html$ index.php?do=stats 
RewriteRule ^addnews.html$ index.php?do=addnews 
RewriteRule ^rss.xml$ engine/rss.php 
RewriteRule ^sitemap.xml$ uploads/sitemap.xml 

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)/page/([0-9]+)(/?)+$ index.php?do=cat&category=$1&cstart=$2 
RewriteRule ^([^.]+)/?$ index.php?do=cat&category=$1 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^<]+)/rss.xml$ engine/rss.php?do=cat&category=$1 
RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 
RewriteRule ^print:([^/]+).html$ engine/print.php?do=static&page=$1 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+).html$ index.php?do=static&page=$1 


i would be apprecaited if someone recode this .htaccess with nGinx Rules

thanks

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




More information about the nginx mailing list