Welcome! Log In Create A New Profile

Advanced

convert .htaccess for nginx

February 06, 2011 02:10PM
Hello,
I have tryed to read about rewrite rules but I'm not able to handle this, Have already tryed online convert for .htaccess to nginx but when I restart my ngnix server I get error message
[code]
[emerg]: invalid parameter "/[L]" in /usr/local/nginx/conf/rrulesvco:24
configuration file /usr/local/nginx/conf/nginx.conf test failed
[/code]

/usr/local/nginx/conf/rrulesvco is include in my nginx.conf file under my "location ~ \.php$ { "


My old .htaccess looks like so:

[code]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^([^.]*)/?$ index.php [L]
RewriteRule ^videos/(.*)/(.*)/(.*)/(.*)/(.*) videos.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^videos videos.php?%{QUERY_STRING} [L]
RewriteRule ^video/(.*)/(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^channels/(.*)/(.*)/(.*)/(.*)/(.*) channels.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^channels channels.php [L]
RewriteRule ^group/([a-zA-Z0-9].+) view_group.php?url=$1&%{QUERY_STRING} [L]
RewriteRule ^view_topic/([a-zA-Z0-9].+)_tid_([0-9]+) view_topic.php?tid=$2&%{QUERY_STRING} [L]
RewriteRule ^groups/(.*)/(.*)/(.*)/(.*)/(.*) groups.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^groups groups.php [L]
RewriteRule ^create_group create_group.php [L]
RewriteRule ^sitemap.xml$ sitemap.php
RewriteRule ^signup signup.php
RewriteRule ^rss$ rss.php [nc]
RewriteRule ^rss/([a-zA-Z0-9].+)$ rss.php?mode=$1&%{QUERY_STRING} [nc]
RewriteRule ^desktop desktop.php [L]

[/code]

Thanks
Subject Author Posted

convert .htaccess for nginx

tophi February 06, 2011 02:10PM

Re: convert .htaccess for nginx

António P. P. Almeida February 06, 2011 02:38PM

Re: convert .htaccess for nginx

tophi February 08, 2011 11:04AM

Re: convert .htaccess for nginx

MyName October 12, 2011 05:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready