首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Apache转换Nginx 有问题?

Apache转换Nginx 有问题?

提问于 2022-05-03 19:13:04
回答 0关注 0查看 39

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^password-reset/([^\/]+)(\/|)$ index.php?link1=welcome&link2=password_reset&user_id=$1 [NC,QSA]

RewriteRule ^admin-cp$ admincp.php [NC,QSA]

RewriteRule ^admin-cp/(.*)$ admincp.php?page=$1 [NC,QSA]

RewriteRule ^admincp$ admincp.php [NC,QSA]

RewriteRule ^admincp/(.*)$ admincp.php?page=$1 [NC,QSA]

RewriteRule ^adminPages/(.*)$ admin-panel/$1 [L]

RewriteRule ^start-up(/?|)$ index.php?link1=start-up [NC,QSA]

RewriteRule ^saved-posts/(.*)$ index.php?link1=saved-posts [NC,QSA]

RewriteRule ^unusual-login(/?|)$ index.php?link1=unusual-login [NC,QSA]

RewriteRule ^activated/(.*)$ index.php?link1=activate&link2=$1 [NC,QSA]

RewriteRule ^search(/?|)$ index.php?link1=search [NC,QSA]

RewriteRule ^ads-create$ index.php?link1=ads-create [NC,QSA]

RewriteRule ^search/([^\/]+)(\/|)$ index.php?link1=search&query=$1 [NC,QSA]

RewriteRule ^app/([^\/]+)(\/|)$ index.php?link1=app&app_id=$1 [NC,QSA]

RewriteRule ^messages/([^\/]+)(\/|)$ index.php?link1=messages&user=$1 [QSA]

RewriteRule ^terms/([^\/]+)(\/|)$ index.php?link1=terms&type=$1 [QSA]

RewriteRule ^video-call/([^\/]+)(\/|)$ index.php?link1=video-call&call_id=$1 [QSA]

RewriteRule ^video-call-api/([^\/]+)(\/|)$ index.php?link1=video-call-api&call_id=$1 [QSA]

RewriteRule ^post/([^\/]+)(\/|)$ index.php?link1=post&id=$1 [NC,QSA]

RewriteRule ^game/([^\/]+)(\/|)$ index.php?link1=game&id=$1 [NC,QSA]

RewriteRule ^upgraded(/?|)$ index.php?link1=upgraded [NC,QSA]

RewriteRule ^get_news_feed(/?|)$ index.php?link1=get_news_feed [NC,QSA]

RewriteRule ^games(/?|)$ index.php?link1=games [NC,QSA]

RewriteRule ^new-game(/?|)$ index.php?link1=new-game [NC,QSA]

RewriteRule ^go-pro(/?|)$ index.php?link1=go-pro [NC,QSA]

RewriteRule ^oops$ index.php?link1=oops [NC,QSA]

RewriteRule ^user-activation$ index.php?link1=user-activation [NC,QSA]

RewriteRule ^hashtag/([^\/]+)(\/|)$ index.php?link1=hashtag&hash=$1 [NC,QSA]

RewriteRule ^follow-requests/(.*)$ index.php?link1=follow-requests[NC,QSA]

RewriteRule ^p/([^\/]+)(\/|)$ index.php?link1=page&p=$1 [NC,QSA]

RewriteRule ^g/([^\/]+)(\/|)$ index.php?link1=group&g=$1 [NC,QSA]

RewriteRule ^home(/?|)$ index.php?link1=home [QSA]

RewriteRule ^404(/?|)$ index.php?link1=404 [QSA]

RewriteRule ^welcome(.*)$ index.php?link1=welcome [QSA,L]

RewriteRule ^register(/?|)$ index.php?link1=register [QSA,L]

RewriteRule ^confirm-sms(/?|)$ index.php?link1=confirm-sms [QSA,L]

RewriteRule ^confirm-sms-password(/?|)$ index.php?link1=confirm-sms-password [QSA,L]

RewriteRule ^forgot-password(/?|)$ index.php?link1=forgot-password [QSA,L]

RewriteRule ^activate(/?|)$ index.php?link1=activate [QSA]

RewriteRule ^pages(/?|)$ index.php?link1=pages [QSA]

RewriteRule ^liked-pages(/?|)$ index.php?link1=liked-pages [QSA]

RewriteRule ^joined_groups(/?|)$ index.php?link1=joined_groups [QSA]

RewriteRule ^suggested-pages(/?|)$ index.php?link1=suggested-pages [QSA]

RewriteRule ^groups(/?|)$ index.php?link1=groups [QSA]

RewriteRule ^suggested-groups(/?|)$ index.php?link1=suggested-groups [QSA]

RewriteRule ^create-group(/?|)$ index.php?link1=create-group [QSA]

RewriteRule ^create-page(/?|)$ index.php?link1=create-page [QSA]

RewriteRule ^logout(/?|)$ index.php?link1=logout [QSA]

RewriteRule ^contact-us(/?|)$ index.php?link1=contact-us [QSA]

RewriteRule ^setting(/?|)$ index.php?link1=setting [QSA]

RewriteRule ^messages(/?|)$ index.php?link1=messages [QSA]

RewriteRule ^saved-posts(/?|)$ index.php?link1=saved-posts [NC,QSA]

RewriteRule ^albums(/?|)$ index.php?link1=albums [QSA]

RewriteRule ^albums/([A-Za-z0-9_-]+)$ index.php?link1=albums&user=$1 [QSA]

RewriteRule ^album/([A-Za-z0-9_-]+)$ index.php?link1=album&id=$1 [QSA]

RewriteRule ^create-album$ index.php?link1=create-album [QSA]

RewriteRule ^create-album/([A-Za-z0-9_-]+)$ index.php?link1=create-album&album=$1 [QSA]

RewriteRule ^$ index.php?link1=home [QSA]

RewriteRule ^setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ index.php?link1=setting&user=$1&page=$2 [NC,QSA]

RewriteRule ^page-setting/([^\/]+)(\/|)$ index.php?link1=page-setting&page=$1 [QSA]

RewriteRule ^page-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ index.php?link1=page-setting&page=$1&link3=$2 [QSA]

RewriteRule ^group-setting/([^\/]+)(\/|)$ index.php?link1=group-setting&group=$1 [QSA]

RewriteRule ^group-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ index.php?link1=group-setting&group=$1&link3=$2 [QSA]

RewriteRule ^new-product(/?|)$ index.php?link1=new-product [NC,QSA]

RewriteRule ^edit-product/([A-Za-z0-9_]+)$ index.php?link1=edit-product&id=$1 [NC,QSA]

RewriteRule ^products(/?|)$ index.php?link1=products [NC,QSA]

RewriteRule ^products/([A-Za-z0-9_-]+)$ index.php?link1=products&c_id=$1 [QSA]

RewriteRule ^products/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ index.php?link1=products&c_id=$1&sub_id=$2 [QSA]

RewriteRule ^my-products(/?|)$ index.php?link1=my-products [QSA]

RewriteRule ^site-pages/(.*)$ index.php?link1=site-pages&page_name=$1 [NC,QSA]

RewriteRule ^blogs(/?|)$ index.php?link1=blogs [NC,QSA]

RewriteRule ^sharer(/?|)$ index.php?link1=sharer [NC,QSA]

RewriteRule ^blog-category/(\d+)(/?|)$ index.php?link1=blog-category&id=$1 [NC,QSA]

RewriteRule ^create-blog(/?|)$ index.php?link1=create-blog [NC,QSA]

RewriteRule ^edit-blog/(\d+)(/?|)$ index.php?link1=edit-blog&id=$1 [NC,QSA]

RewriteRule ^my-blogs(/?|)$ index.php?link1=my-blogs [NC,QSA]

RewriteRule ^read-blog/(.*)$ index.php?link1=read-blog&id=$1 [NC,QSA]

RewriteRule ^app_api(/?|)$ index.php?link1=app_api [NC,QSA]

RewriteRule ^api_request(/?|)$ index.php?link1=app_api [NC,QSA]

RewriteRule ^authorize(/?|)$ index.php?link1=authorize [NC,QSA]

RewriteRule ^poke(/?|)$ index.php?link1=poke [NC,QSA]

RewriteRule ^most_liked(/?|)$ index.php?link1=most_liked [NC,QSA]

RewriteRule ^jobs(/?|)$ index.php?link1=jobs [NC,QSA]

RewriteRule ^common_things(/?|)$ index.php?link1=common_things [NC,QSA]

RewriteRule ^funding(/?|)$ index.php?link1=funding [NC,QSA]

RewriteRule ^my_funding(/?|)$ index.php?link1=my_funding [NC,QSA]

RewriteRule ^create_funding(/?|)$ index.php?link1=create_funding [NC,QSA]

RewriteRule ^edit_fund/(.*)$ index.php?link1=edit_fund&id=$1 [NC,QSA]

RewriteRule ^show_fund/(.*)$ index.php?link1=show_fund&id=$1 [NC,QSA]

RewriteRule ^live(/?|)$ index.php?link1=live [NC,QSA]

RewriteRule ^memories(/?|)$ index.php?link1=memories [NC,QSA]

RewriteRule ^offers(/?|)$ index.php?link1=offers [NC,QSA]

RewriteRule ^nearby_shops(/?|)$ index.php?link1=nearby_shops [NC,QSA]

RewriteRule ^nearby_business(/?|)$ index.php?link1=nearby_business [NC,QSA]

RewriteRule ^refund(/?|)$ index.php?link1=refund [NC,QSA]

RewriteRule ^advertise(/?|)$ index.php?link1=advertise [NC,QSA]

RewriteRule ^checkout(/?|)$ index.php?link1=checkout [NC,QSA]

RewriteRule ^purchased(/?|)$ index.php?link1=purchased [NC,QSA]

RewriteRule ^orders(/?|)$ index.php?link1=orders [NC,QSA]

RewriteRule ^customer_order/(.*)$ index.php?link1=customer_order&id=$1 [NC,QSA]

RewriteRule ^order/(.*)$ index.php?link1=order&id=$1 [NC,QSA]

RewriteRule ^reviews/(.*)$ index.php?link1=reviews&id=$1 [NC,QSA]

RewriteRule ^open_to_work_posts(/?|)$ index.php?link1=open_to_work_posts [NC,QSA]

RewriteRule ^banned(/?|)$ index.php?link1=banned [NC,QSA]

RewriteRule ^withdrawal(/?|)$ index.php?link1=withdrawal [NC,QSA]

# **** FORUM ****

RewriteRule ^forum(/?|)$ index.php?link1=forum [NC,QSA]

RewriteRule ^forum/members(/?|)$ index.php?link1=forum-members [NC,QSA]

RewriteRule ^forum/members/([a-zA-Z]{0,1})(/?|)$ index.php?link1=forum-members-byname&char=$1 [NC,QSA]

RewriteRule ^forum/search(/?|)$ index.php?link1=forum-search [NC,QSA]

RewriteRule ^forum/search-result/(/?|)$ index.php?link1=forum-search-result [NC,QSA]

RewriteRule ^forum/events(/?|)$ index.php?link1=forum-events [NC,QSA]

RewriteRule ^forum/help(/?|)$ index.php?link1=forum-help [NC,QSA]

RewriteRule ^forums/(\d+)(/?|)$ index.php?link1=forums&fid=$1 [NC,QSA]

RewriteRule ^forums/add/(\d+)(/?|)$ index.php?link1=forumaddthred&fid=$1 [NC,QSA]

RewriteRule ^forums/thread/(\d+)(/?|)$ index.php?link1=showthread&tid=$1 [NC,QSA]

RewriteRule ^forums/thread/reply/(\d+)(/?|)$ index.php?link1=threadreply&tid=$1 [NC,QSA]

RewriteRule ^forums/thread/quote/(\d+)(/?|)$ index.php?link1=threadquote&tid=$1 [NC,QSA]

RewriteRule ^forums/thread/edit/(\d+)(/?|)$ index.php?link1=editreply&tid=$1 [NC,QSA]

RewriteRule ^forums/user/threads(/?|)$ index.php?link1=mythreads [NC,QSA]

RewriteRule ^forums/user/threads/edit/(\d+)(/?|)$ index.php?link1=edithread&tid=$1 [NC,QSA]

RewriteRule ^forums/user/messages(/?|)$ index.php?link1=mymessages [NC,QSA]

# **** EVENTS ****

RewriteRule ^events(/?|)$ index.php?link1=events [NC,QSA]

RewriteRule ^events/create-event(/?|)$ index.php?link1=create-event [NC,QSA]

RewriteRule ^events/edit/(\d+)/(/?|)$ index.php?link1=edit-event&eid=$1 [NC,QSA]

RewriteRule ^events/my(/?|)$ index.php?link1=my-events [NC,QSA]

RewriteRule ^events/going(/?|)$ index.php?link1=events-going [NC,QSA]

RewriteRule ^events/invited(/?|)$ index.php?link1=events-invited [NC,QSA]

RewriteRule ^events/interested(/?|)$ index.php?link1=events-interested [NC,QSA]

RewriteRule ^events/past(/?|)$ index.php?link1=events-past [NC,QSA]

RewriteRule ^events/(\d+)(/?|)$ index.php?link1=show-event&eid=$1 [NC,QSA]

# *** MOVIES ***

RewriteRule ^movies(/?|)$ index.php?link1=movies [NC,QSA]

RewriteRule ^movies/genre/([A-Za-z-]+)(/?|)$ index.php?link1=movies-genre&genre=$1 [NC,QSA]

RewriteRule ^movies/country/([A-Za-z-]+)(/?|)$ index.php?link1=movies-country&country=$1 [NC,QSA]

RewriteRule ^movies/watch/(\d+)(/?|)$ index.php?link1=watch-film&film-id=$1 [NC,QSA]

# *** ADS ***

RewriteRule ^ads(/?|)$ index.php?link1=ads [NC,QSA]

RewriteRule ^wallet(/?|)$ index.php?link1=wallet [NC,QSA]

RewriteRule ^send_money(/?|)$ index.php?link1=send_money [NC,QSA]

RewriteRule ^ads/create(/?|)$ index.php?link1=create-ads [NC,QSA]

RewriteRule ^ads/edit/(\d+)(/?|)$ index.php?link1=edit-ads&id=$1 [NC,QSA]

RewriteRule ^ads/chart/(\d+)(/?|)$ index.php?link1=chart-ads&id=$1 [NC,QSA]

RewriteRule ^admin/ads/edit/(\d+)(/?|)$ index.php?link1=manage-ads&id=$1 [NC,QSA]

# *** STATUS ***

RewriteRule ^status/create(/?|)$ index.php?link1=create-status [NC,QSA]

RewriteRule ^more-status(/?|)$ index.php?link1=more-status [NC,QSA]

# *** FIND NEARBY ***

RewriteRule ^friends-nearby(/?|)$ index.php?link1=friends-nearby [NC,QSA]

RewriteRule ^api(/?|)$ api-v2.php [NC,QSA]

RewriteRule ^api/([^\/]+)(\/|)$ api-v2.php?type=$1 [NC,QSA]

RewriteRule ^_$ requests.php [QSA]

RewriteRule ^graph-success$ index.php?link1=graph-success [NC,QSA]

RewriteRule ^developers$ index.php?link1=developers [NC,QSA]

RewriteRule ^apps$ index.php?link1=apps [NC,QSA]

RewriteRule ^create-app$ index.php?link1=create-app [NC,QSA]

RewriteRule ^graph$ index.php?link1=graph [NC,QSA]

RewriteRule ^oauth$ index.php?link1=oauth [NC,QSA]

RewriteRule ^boosted-pages(/?|)$ index.php?link1=boosted-pages [NC,QSA]

RewriteRule ^boosted-posts(/?|)$ index.php?link1=boosted-posts [NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^setting/([A-Za-z0-9_-]+)$ index.php?link1=setting&page=$1 [NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^@([^\/]+)(\/|)$ index.php?link1=timeline&u=$1 [QSA]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([A-Za-z0-9_]+)/([^\/]+)(\/|)$ index.php?link1=timeline&u=$1&type=$2 [QSA]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([^\/]+)(\/|)$ index.php?link1=timeline&u=$1 [QSA]

<IfModule mod_deflate.c>

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE text/xml

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE image/x-icon

AddOutputFilterByType DEFLATE image/svg+xml

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

AddOutputFilterByType DEFLATE application/xml

AddOutputFilterByType DEFLATE application/xhtml+xml

AddOutputFilterByType DEFLATE application/x-font

AddOutputFilterByType DEFLATE application/x-font-truetype

AddOutputFilterByType DEFLATE application/x-font-ttf

AddOutputFilterByType DEFLATE application/x-font-otf

AddOutputFilterByType DEFLATE application/x-font-opentype

AddOutputFilterByType DEFLATE application/vnd.ms-fontobject

AddOutputFilterByType DEFLATE font/ttf

AddOutputFilterByType DEFLATE font/otf

AddOutputFilterByType DEFLATE font/opentype

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</IfModule>

<IfModule mod_security.c>

SecFilterScanPOST Off

</IfModule>

## EXPIRES CACHING ##

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access plus 1 year"

ExpiresByType image/jpeg "access plus 1 year"

ExpiresByType image/gif "access plus 1 year"

ExpiresByType image/png "access plus 1 year"

ExpiresByType text/css "access plus 1 month"

ExpiresByType application/pdf "access plus 1 month"

ExpiresByType text/x-javascript "access plus 1 month"

ExpiresByType application/x-shockwave-flash "access plus 1 month"

ExpiresByType image/x-icon "access plus 1 year"

ExpiresDefault "access plus 1 month"

</IfModule>

## EXPIRES CACHING ##

<ifModule mod_headers.c>

Header unset Connection

Header set Connection keep-alive

Header unset Keep-Alive

Header set Keep-Alive timeout=100,max=500

</ifModule>

然后


location / {

if (!-e $request_filename){

rewrite ^/password-reset/([^\/]+)(\/|)$ /index.php?link1=welcome&link2=password_reset&user_id=$1;

}

rewrite ^/$ /index.php?link1=home;

rewrite "^/forum/members/([a-zA-Z]{0,1})(/?|)$" /index.php?link1=forum-members-byname&char=$1;

if (!-e $request_filename){

rewrite ^/setting/([A-Za-z0-9_-]+)$ /index.php?link1=setting&page=$1;

}

if (!-e $request_filename){

rewrite ^/@([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1;

}

if (!-e $request_filename){

rewrite ^/([A-Za-z0-9_]+)/([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1&type=$2;

}

if (!-e $request_filename){

rewrite ^/([^\/]+)(\/|)$ /index.php?link1=timeline&u=$1;

}

}

location /admin {

rewrite ^/admin-cp$ /admincp.php;

rewrite ^/admin-cp/(.*)$ /admincp.php?page=$1;

rewrite ^/admin/ads/edit/(\d+)(/?|)$ /index.php?link1=manage-ads&id=$1;

}

location = /admincp {

rewrite ^(.*)$ /admincp.php;

}

location /admincp {

rewrite ^/admincp/(.*)$ /admincp.php?page=$1;

}

location /adminPages/ {

alias /admin-panel/;

}

location /start {

rewrite ^/start-up(/?|)$ /index.php?link1=start-up;

}

location /saved {

rewrite ^/saved-posts/(.*)$ /index.php?link1=saved-posts;

rewrite ^/saved-posts(/?|)$ /index.php?link1=saved-posts;

}

location /unusual {

rewrite ^/unusual-login(/?|)$ /index.php?link1=unusual-login;

}

location /activated {

rewrite ^/activated/(.*)$ /index.php?link1=activate&link2=$1;

}

location /search {

rewrite ^/search(/?|)$ /index.php?link1=search;

rewrite ^/search/([^\/]+)(\/|)$ /index.php?link1=search&query=$1;

}

location /ads {

rewrite ^/ads-create$ /index.php?link1=ads-create;

rewrite ^/ads(/?|)$ /index.php?link1=ads;

rewrite ^/ads/create(/?|)$ /index.php?link1=create-ads;

rewrite ^/ads/edit/(\d+)(/?|)$ /index.php?link1=edit-ads&id=$1;

rewrite ^/ads/chart/(\d+)(/?|)$ /index.php?link1=chart-ads&id=$1;

}

location /app {

rewrite ^/app/([^\/]+)(\/|)$ /index.php?link1=app&app_id=$1;

}

location /messages {

rewrite ^/messages/([^\/]+)(\/|)$ /index.php?link1=messages&user=$1;

rewrite ^/messages(/?|)$ /index.php?link1=messages;

}

location /terms {

rewrite ^/terms/([^\/]+)(\/|)$ /index.php?link1=terms&type=$1;

}

location /video {

rewrite ^/video-call/([^\/]+)(\/|)$ /index.php?link1=video-call&call_id=$1;

rewrite ^/video-call-api/([^\/]+)(\/|)$ /index.php?link1=video-call-api&call_id=$1;

}

location /post {

rewrite ^/post/([^\/]+)(\/|)$ /index.php?link1=post&id=$1;

}

location /game {

rewrite ^/game/([^\/]+)(\/|)$ /index.php?link1=game&id=$1;

}

location /upgraded {

rewrite ^/upgraded(/?|)$ /index.php?link1=upgraded;

}

location /get_news_feed {

rewrite ^/get_news_feed(/?|)$ /index.php?link1=get_news_feed;

}

location /games {

rewrite ^/games(/?|)$ /index.php?link1=games;

}

location /new {

rewrite ^/new-game(/?|)$ /index.php?link1=new-game;

rewrite ^/new-product(/?|)$ /index.php?link1=new-product;

}

location /go {

rewrite ^/go-pro(/?|)$ /index.php?link1=go-pro;

}

location = /oops {

rewrite ^(.*)$ /index.php?link1=oops;

}

location /user {

rewrite ^/user-activation$ /index.php?link1=user-activation;

}

location /hashtag {

rewrite ^/hashtag/([^\/]+)(\/|)$ /index.php?link1=hashtag&hash=$1;

}

location /follow {

rewrite ^/follow-requests/(.*)$ /index.php?link1=follow-requests;

}

location /p {

rewrite ^/p/([^\/]+)(\/|)$ /index.php?link1=page&p=$1;

}

location /g {

rewrite ^/g/([^\/]+)(\/|)$ /index.php?link1=group&g=$1;

}

location /home {

rewrite ^/home(/?|)$ /index.php?link1=home;

}

location /404 {

rewrite ^/404(/?|)$ /index.php?link1=404;

}

location /welcome {

rewrite ^/welcome(.*)$ /index.php?link1=welcome break;

}

location /register {

rewrite ^/register(/?|)$ /index.php?link1=register break;

}

location /confirm {

rewrite ^/confirm-sms(/?|)$ /index.php?link1=confirm-sms break;

rewrite ^/confirm-sms-password(/?|)$ /index.php?link1=confirm-sms-password break;

}

location /forgot {

rewrite ^/forgot-password(/?|)$ /index.php?link1=forgot-password break;

}

location /activate {

rewrite ^/activate(/?|)$ /index.php?link1=activate;

}

location /pages {

rewrite ^/pages(/?|)$ /index.php?link1=pages;

}

location /liked {

rewrite ^/liked-pages(/?|)$ /index.php?link1=liked-pages;

}

location /joined_groups {

rewrite ^/joined_groups(/?|)$ /index.php?link1=joined_groups;

}

location /suggested {

rewrite ^/suggested-pages(/?|)$ /index.php?link1=suggested-pages;

rewrite ^/suggested-groups(/?|)$ /index.php?link1=suggested-groups;

}

location /groups {

rewrite ^/groups(/?|)$ /index.php?link1=groups;

}

location /create {

rewrite ^/create-group(/?|)$ /index.php?link1=create-group;

rewrite ^/create-page(/?|)$ /index.php?link1=create-page;

rewrite ^/create-album$ /index.php?link1=create-album;

rewrite ^/create-album/([A-Za-z0-9_-]+)$ /index.php?link1=create-album&album=$1;

rewrite ^/create-blog(/?|)$ /index.php?link1=create-blog;

rewrite ^/create-app$ /index.php?link1=create-app;

}

location /logout {

rewrite ^/logout(/?|)$ /index.php?link1=logout;

}

location /contact {

rewrite ^/contact-us(/?|)$ /index.php?link1=contact-us;

}

location /setting {

rewrite ^/setting(/?|)$ /index.php?link1=setting;

rewrite ^/setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=setting&user=$1&page=$2;

}

location /albums {

rewrite ^/albums(/?|)$ /index.php?link1=albums;

rewrite ^/albums/([A-Za-z0-9_-]+)$ /index.php?link1=albums&user=$1;

}

location /album {

rewrite ^/album/([A-Za-z0-9_-]+)$ /index.php?link1=album&id=$1;

}

location /page {

rewrite ^/page-setting/([^\/]+)(\/|)$ /index.php?link1=page-setting&page=$1;

rewrite ^/page-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=page-setting&page=$1&link3=$2;

}

location /group {

rewrite ^/group-setting/([^\/]+)(\/|)$ /index.php?link1=group-setting&group=$1;

rewrite ^/group-setting/([A-Za-z0-9_]+)/([A-Za-z0-9_-]+)$ /index.php?link1=group-setting&group=$1&link3=$2;

}

location /edit {

rewrite ^/edit-product/([A-Za-z0-9_]+)$ /index.php?link1=edit-product&id=$1;

rewrite ^/edit-blog/(\d+)(/?|)$ /index.php?link1=edit-blog&id=$1;

}

location /products {

rewrite ^/products(/?|)$ /index.php?link1=products;

rewrite ^/products/([A-Za-z0-9_-]+)$ /index.php?link1=products&c_id=$1;

rewrite ^/products/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?link1=products&c_id=$1&sub_id=$2;

}

location /my {

rewrite ^/my-products(/?|)$ /index.php?link1=my-products;

rewrite ^/my-blogs(/?|)$ /index.php?link1=my-blogs;

}

location /site {

rewrite ^/site-pages/(.*)$ /index.php?link1=site-pages&page_name=$1;

}

location /blogs {

rewrite ^/blogs(/?|)$ /index.php?link1=blogs;

}

location /sharer {

rewrite ^/sharer(/?|)$ /index.php?link1=sharer;

}

location /blog {

rewrite ^/blog-category/(\d+)(/?|)$ /index.php?link1=blog-category&id=$1;

}

location /read {

rewrite ^/read-blog/(.*)$ /index.php?link1=read-blog&id=$1;

}

location /app_api {

rewrite ^/app_api(/?|)$ /index.php?link1=app_api;

}

location /api_request {

rewrite ^/api_request(/?|)$ /index.php?link1=app_api;

}

location /authorize {

rewrite ^/authorize(/?|)$ /index.php?link1=authorize;

}

location /poke {

rewrite ^/poke(/?|)$ /index.php?link1=poke;

}

location /most_liked {

rewrite ^/most_liked(/?|)$ /index.php?link1=most_liked;

}

location /jobs {

rewrite ^/jobs(/?|)$ /index.php?link1=jobs;

}

location /common_things {

rewrite ^/common_things(/?|)$ /index.php?link1=common_things;

}

location /funding {

rewrite ^/funding(/?|)$ /index.php?link1=funding;

}

location /my_funding {

rewrite ^/my_funding(/?|)$ /index.php?link1=my_funding;

}

location /create_funding {

rewrite ^/create_funding(/?|)$ /index.php?link1=create_funding;

}

location /edit_fund {

rewrite ^/edit_fund/(.*)$ /index.php?link1=edit_fund&id=$1;

}

location /show_fund {

rewrite ^/show_fund/(.*)$ /index.php?link1=show_fund&id=$1;

}

location /live {

rewrite ^/live(/?|)$ /index.php?link1=live;

}

location /memories {

rewrite ^/memories(/?|)$ /index.php?link1=memories;

}

location /offers {

rewrite ^/offers(/?|)$ /index.php?link1=offers;

}

location /nearby_shops {

rewrite ^/nearby_shops(/?|)$ /index.php?link1=nearby_shops;

}

location /nearby_business {

rewrite ^/nearby_business(/?|)$ /index.php?link1=nearby_business;

}

location /refund {

rewrite ^/refund(/?|)$ /index.php?link1=refund;

}

location /advertise {

rewrite ^/advertise(/?|)$ /index.php?link1=advertise;

}

location /checkout {

rewrite ^/checkout(/?|)$ /index.php?link1=checkout;

}

location /purchased {

rewrite ^/purchased(/?|)$ /index.php?link1=purchased;

}

location /orders {

rewrite ^/orders(/?|)$ /index.php?link1=orders;

}

location /customer_order {

rewrite ^/customer_order/(.*)$ /index.php?link1=customer_order&id=$1;

}

location /order {

rewrite ^/order/(.*)$ /index.php?link1=order&id=$1;

}

location /reviews {

rewrite ^/reviews/(.*)$ /index.php?link1=reviews&id=$1;

}

location /open_to_work_posts {

rewrite ^/open_to_work_posts(/?|)$ /index.php?link1=open_to_work_posts;

}

location /banned {

rewrite ^/banned(/?|)$ /index.php?link1=banned;

}

location /withdrawal {

rewrite ^/withdrawal(/?|)$ /index.php?link1=withdrawal;

}

location /forum {

rewrite ^/forum(/?|)$ /index.php?link1=forum;

rewrite ^/forum/members(/?|)$ /index.php?link1=forum-members;

rewrite ^/forum/search(/?|)$ /index.php?link1=forum-search;

rewrite ^/forum/search-result/(/?|)$ /index.php?link1=forum-search-result;

rewrite ^/forum/events(/?|)$ /index.php?link1=forum-events;

rewrite ^/forum/help(/?|)$ /index.php?link1=forum-help;

}

location /forums {

rewrite ^/forums/(\d+)(/?|)$ /index.php?link1=forums&fid=$1;

rewrite ^/forums/add/(\d+)(/?|)$ /index.php?link1=forumaddthred&fid=$1;

rewrite ^/forums/thread/(\d+)(/?|)$ /index.php?link1=showthread&tid=$1;

rewrite ^/forums/thread/reply/(\d+)(/?|)$ /index.php?link1=threadreply&tid=$1;

rewrite ^/forums/thread/quote/(\d+)(/?|)$ /index.php?link1=threadquote&tid=$1;

rewrite ^/forums/thread/edit/(\d+)(/?|)$ /index.php?link1=editreply&tid=$1;

rewrite ^/forums/user/threads(/?|)$ /index.php?link1=mythreads;

rewrite ^/forums/user/threads/edit/(\d+)(/?|)$ /index.php?link1=edithread&tid=$1;

rewrite ^/forums/user/messages(/?|)$ /index.php?link1=mymessages;

}

location /events {

rewrite ^/events(/?|)$ /index.php?link1=events;

rewrite ^/events/create-event(/?|)$ /index.php?link1=create-event;

rewrite ^/events/edit/(\d+)/(/?|)$ /index.php?link1=edit-event&eid=$1;

rewrite ^/events/my(/?|)$ /index.php?link1=my-events;

rewrite ^/events/going(/?|)$ /index.php?link1=events-going;

rewrite ^/events/invited(/?|)$ /index.php?link1=events-invited;

rewrite ^/events/interested(/?|)$ /index.php?link1=events-interested;

rewrite ^/events/past(/?|)$ /index.php?link1=events-past;

rewrite ^/events/(\d+)(/?|)$ /index.php?link1=show-event&eid=$1;

}

location /movies {

rewrite ^/movies(/?|)$ /index.php?link1=movies;

rewrite ^/movies/genre/([A-Za-z-]+)(/?|)$ /index.php?link1=movies-genre&genre=$1;

rewrite ^/movies/country/([A-Za-z-]+)(/?|)$ /index.php?link1=movies-country&country=$1;

rewrite ^/movies/watch/(\d+)(/?|)$ /index.php?link1=watch-film&film-id=$1;

}

location /wallet {

rewrite ^/wallet(/?|)$ /index.php?link1=wallet;

}

location /send_money {

rewrite ^/send_money(/?|)$ /index.php?link1=send_money;

}

location /status {

rewrite ^/status/create(/?|)$ /index.php?link1=create-status;

}

location /more {

rewrite ^/more-status(/?|)$ /index.php?link1=more-status;

}

location /friends {

rewrite ^/friends-nearby(/?|)$ /index.php?link1=friends-nearby;

}

location /api {

rewrite ^/api(/?|)$ /api-v2.php;

rewrite ^/api/([^\/]+)(\/|)$ /api-v2.php?type=$1;

}

location /_ {

rewrite ^/_$ /requests.php;

}

location /graph {

rewrite ^/graph-success$ /index.php?link1=graph-success;

}

location = /developers {

rewrite ^(.*)$ /index.php?link1=developers;

}

location = /apps {

rewrite ^(.*)$ /index.php?link1=apps;

}

location = /graph {

rewrite ^(.*)$ /index.php?link1=graph;

}

location = /oauth {

rewrite ^(.*)$ /index.php?link1=oauth;

}

location /boosted {

rewrite ^/boosted-pages(/?|)$ /index.php?link1=boosted-pages;

rewrite ^/boosted-posts(/?|)$ /index.php?link1=boosted-posts;

}

location /sources {

deny all;

return 404;

}

location /assets {

deny all;

return 404;

}

location /nodejs {

deny all;

return 404;

}

有问题请问一下 应该是怎么样的

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档