
Originally Posted by
jayscot
Many of you received the email this morning regarding the move of all servers on APTHost away from Apache. What this means is that the htaccess file will no longer work and the mod rules will have to be rewritten. They did provide a help link to a Nginx hacker site for help in recoding the scripts but many of us are now over our heads and need help. Admin, can you help us here?
I'm hosted with Apt Host and they converted mine for me, they asked me if I would share it with the Vshare users.
Near bottom, for Hot-Link code, Change YOURSITE.COM to your own. Do not include www.
Code:
if (!-e $request_filename) {
rewrite ^/view/(.*)/(.*)/ /view_video.php?id=$1 last;
rewrite ^/tag/(.*)/(.*) /tag.php?search_id=$1&page=$2 last;
rewrite ^/channel/(.*)/(.*)/recent/(.*) /video.php?category=recent&chid=$1&page=$3;
rewrite ^/channel/(.*)/(.*)/viewed/(.*) /video.php?category=viewed&chid=$1&page=$3;
rewrite ^/channel/(.*)/(.*)/ /channel_detail.php?id=$1;
rewrite ^/detailed/recent/(.*) /video.php?category=recent&page=$1&viewtype=detailed;
rewrite ^/detailed/viewed/(.*) /video.php?category=viewed&page=$1&viewtype=detailed;
rewrite ^/detailed/discussed/(.*) /video.php?category=discussed&page=$1&viewtype=detailed;
rewrite ^/detailed/favorites/(.*) /video.php?category=favorites&page=$1&viewtype=detailed;
rewrite ^/detailed/rated/(.*) /video.php?category=rated&page=$1&viewtype=detailed;
rewrite ^/detailed/featured/(.*) /video.php?category=featured&page=$1&viewtype=detailed;
rewrite ^/detailed/random/(.*) /video.php?category=random&page=$1&viewtype=detailed;
rewrite ^/recent/(.*) /video.php?category=recent&page=$1;
rewrite ^/viewed/(.*) /video.php?category=viewed&page=$1;
rewrite ^/discussed/(.*) /video.php?category=discussed&page=$1;
rewrite ^/favorites/(.*) /video.php?category=favorites&page=$1;
rewrite ^/rated/(.*) /video.php?category=rated&page=$1;
rewrite ^/featured/(.*) /video.php?category=featured&page=$1;
rewrite ^/random/(.*) /video.php?category=random&page=$1;
rewrite ^/rss/new/ /rss.php?type=new last;
rewrite ^/rss/comments/ /rss.php?type=comments last;
rewrite ^/rss/views/ /rss.php?type=views last;
rewrite ^/group/(.*)/members/(.*) /group_members.php?urlkey=$1&page=$2;
rewrite ^/group/(.*)/videos/(.*) /group_videos.php?urlkey=$1&page=$2;
rewrite ^/group/(.*)/add/(.*) /add_video.php?urlkey=$1&page=$2;
rewrite ^/group/(.*)/fav/(.*) /add_favour.php?urlkey=$1&page=$2;
rewrite ^/group/(.*)/topic/(.*) /group_posts.php?urlkey=$1&tid=$2;
rewrite ^/group/(.*)/invite/ /invite_members.php?urlkey=$1 last;
rewrite ^/group/(.*)/ /groups_home.php?urlkey=$1 last;
rewrite ^/groups/(.*)/(.*)/(.*) /groups.php?chid=$1&page=$3;
rewrite ^/groups/(.*)/(.*) /groups.php?category=$1&page=$2;
rewrite ^/include/(.*) http://www.vshare.in;
rewrite ^/pages/(.*).html$ /show_page.php?name=$1 last;
rewrite ^/([^/\.]+)/favorites/(.*) /user_favorites.php?username=$1&page=$2;
rewrite ^/([^/\.]+)/playlist/(.*) /playlist.php?username=$1&page=$2;
rewrite ^/([^/\.]+)/friends/(.*) /user_friends.php?username=$1&page=$2;
rewrite ^/([^/\.]+)/public/(.*)$ /user_videos.php?username=$1&type=public&page=$2;
rewrite ^/([^/\.]+)/private/(.*)$ /user_videos.php?username=$1&type=private&page=$2 last;
rewrite ^/([^/\.]+)/groups/(.*)$ /user_groups.php?username=$1&page=$2 last;
rewrite ^/([^/\.]+)?/?$ /user.php?username=$1 last;
}
location ~ \.(jpg|jpeg|gif|png|bmp)$ {
valid_referers none blocked yoursite.com *.yoursite.com;
if ($invalid_referer) {
return 403;
}
}
Bookmarks