Question
Someone help me with mod_rewrite Nginx
This is .htaccess
Options -Indexes
RewriteEngine On
RewriteCond %{REQUESTFILENAME} !-f
RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUESTURI} !^/index.
RewriteCond %{REQUESTURI} !^/$
RewriteRule ^([^/])$ /?page=$1 [L,QSA]
RewriteRule ^([^-])/([^-]*)/$ /?page=$1&act=$2 [QSA,L]
RewriteRule ^upload/([^/])$ /?page=upload&act=$1 [L]
RewriteRule ^torrents/([0-9]+)$ /?page=torrents&next=$1 [L,QSA]
RewriteRule ^torrents/cat/([^/])$ /?page=torrents&catid=$1 [L,QSA]
RewriteRule ^torrents/cat/([^/])/([^/])$ /?page=torrents&catid=$1&next=$2 [L,QSA]
RewriteRule ^torrents/search/([^/])$ /?page=torrents&search=$1 [L,QSA]
RewriteRule ^torrents/search/([^/])/([^/])$ /?page=torrents&search=$1&next=$2 [L,QSA]
RewriteRule ^torrents/([^/])/([^/])$ /?page=torrents&sortedBy=$1&axis=$2 [L,QSA]
RewriteRule ^torrents/([^/])/([^/])/([^/])$ /?page=torrents&next=$1&sortedBy=$2&axis=$3 [L,QSA]
RewriteRule ^torrents/cat/([^/])/([^/])/([^/])$ /?page=torrents&catid=$1&sortedBy=$2&axis=$3 [L,QSA]
RewriteRule ^torrents/cat/([^/])/([^/])/([^/])/([^/])$ /?page=torrents&catid=$1&next=$2&sortedBy=$3&axis=$4 [L,QSA]
RewriteRule ^torrent-detail/([^/])$ /?page=torrent-detail&id=$1 [L,QSA]
RewriteRule ^torrent-detail/([^/])/([^/])$ /?page=torrent-detail&id=$1&urlTitle=$2 [L,QSA]
RewriteRule ^torrent-edit/([^/])/([^/])$ /?page=torrent-edit&id=$1&urlTitle=$2 [L]
RewriteRule ^torrent-delete/([^/])/([^/])$ /?page=torrent-delete&id=$1&hash=$2 [L]
RewriteRule ^download/([^/])$ /?page=download&hash=$1 [L]
RewriteRule ^rss/([^/])$ /?page=rss&cat=$1 [L]
RewriteRule ^account/([0-9]+)$ /?page=account&next=$1 [QSA,L]
RewriteRule ^admincp/users/([0-9]+)$ /?page=admincp&act=users&next=$1 [QSA,L]
I use Nginx unbuntu 14-04
How to change in nginx conf
and this is in subfolder torrent
is like www.domain.com/torrent
Pls any help i will be greatful. Tnx .
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×