Forum: NGINX Need help to convert .htaccess to nginx rules

Posted by onel0ve (Guest)
on 2013-03-05 18:40
(Received via mailing list)
[code]<Files *.htm>
#Compress
SetOutputFilter DEFLATE
</Files>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# please use .php at url for admin
RewriteRule ^recent-articles-feed rss.php [NC]
RewriteRule ^rss/([^/]+) rss.php?q=$1 [NC]

# To ignore htaccess - enlist here
RewriteCond $1
!^(index\.php|ftpservice|demo|ftpdb|MDF|phpsysinfo|admin|templates|links|api|forum|articles|imageGallery|language|includes|ajax|resources|fonts|images|parse|directory|uploads|system|rss\.php|robots\.txt|sitemap\.php|Sitemap\.xml|sitemap\.xml|sitemap2\.xml|urllist\.txt)


RewriteRule ^(.*) index.php [NC] [/code]


This is my htaccess content .

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236960,236960#msg-236960
Posted by mex (Guest)
on 2013-03-06 07:31
(Received via mailing list)
maybe this helps as a start:
http://stackoverflow.com/questions/5840497/convert...

and you may want to read
http://wiki.nginx.org/HttpCoreModule#location
http://wiki.nginx.org/HttpRewriteModule

since usage and order-of-procerssing is quite a little different




regards,


mex

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236960,236975#msg-236975
Posted by onel0ve (Guest)
on 2013-03-06 11:13
(Received via mailing list)
I just need to convert this to nginx rules .


# To ignore htaccess - enlist here
RewriteCond $1
!^(index\.php|ftpservice|demo|ftpdb|MDF|phpsysinfo|admin|templates|links|
api|forum|articles|imageGallery|language|includes|ajax|resources|fonts|images|parse|directory|
uploads|system|rss\.php|robots\.txt|sitemap\.php|Sitemap\.xml|sitemap\.xml|sitemap2\.xml|urllist\.txt)

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236960,236980#msg-236980
Posted by Andre Jaenisch (Guest)
on 2013-03-06 13:35
(Received via mailing list)
2013/3/6 onel0ve <nginx-forum@nginx.us>:
> I just need to convert this to nginx rules .

I guess, the thing is, that you shall learn, how this can be achieved.
So you can do it on your own the next time.
In case you've tried it yet, it may be helpful to show your attempts.
Look, it seems that you want others to do your job. As far as I can
tell many people will refuse to do so.

So show some love and see what comes back ;-)

Regards,

André
Posted by Jonathan Matthews (Guest)
on 2013-03-06 16:39
(Received via mailing list)
On 6 March 2013 12:34, Andre Jaenisch <andrejaenisch@googlemail.com> 
wrote:
> 2013/3/6 onel0ve <nginx-forum@nginx.us>:
>> I just need to convert this to nginx rules .
>
> I guess, the thing is, that you shall learn, how this can be achieved.
> So you can do it on your own the next time.
> In case you've tried it yet, it may be helpful to show your attempts.
> Look, it seems that you want others to do your job. As far as I can
> tell many people will refuse to do so.
>
> So show some love and see what comes back ;-)

+1. Show your working, show where you got stuck or what doesn't work,
and you'll find people are much more eager to help you :-)

Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html
Posted by onel0ve (Guest)
on 2013-03-07 17:34
(Received via mailing list)
ok
CAn you just tell how to exclude a directory from nginx rules ? . I want 
to
disable mod rewrite for one sub folder .

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236960,237083#msg-237083
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.