Last active
July 2, 2020 07:33
-
-
Save Thirdwrist/0c32a1460ef8a62bd30fc8962c8f47ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex index.html index.php | |
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# If installed in local or under a path say /getteachrfarid /: (otherwise, doesn't need RewriteBase) | |
RewriteBase / | |
RewriteRule ^(docs)($|/) - [L] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^img/([a-zA-Z_]*)/([a-zA-Z_]*)/(.*)$ server/php/image.php?size=$1&model=$2&filename=$3 [NC] | |
RewriteRule ^download/([a-zA-Z0-9_.]*)/([a-zA-Z0-9_.]*)$ server/php/download.php?hash=$1&type=$2 [NC] | |
RewriteRule ^client/download/([0-9]*)/([a-zA-Z0-9_\.]*)/([0-9]*)$ server/php/plugins/DownloadableFileLessons/download.php?id=$1&hash=$2×tamp=$3 [NC] | |
RewriteRule ^video/([a-zA-Z_]*)/([0-9]*)/([a-zA-Z0-9_\.]*)/([0-9]*)$ server/php/plugins/VideoLessons/play_video.php?type=$1&id=$2&hash=$3×tamp=$4 [NC] | |
RewriteRule ^audio/([a-zA-Z_]*)/([0-9]*)/([a-zA-Z0-9_\.]*)/([0-9]*)$ server/php/plugins/AudioLessons/play_audio.php?type=$1&id=$2&hash=$3×tamp=$4 [NC] | |
#RewriteRule ^api/(.*)$ server/php/R/r.php?_url=$1 [QSA,L] | |
RewriteRule ^api/(.*)$ server/php/Slim/public/index.php [QSA,L] | |
RewriteRule ^ipn/receiver_account_ipn/([0-9]*)/users/([0-9]*)/hash/([a-zA-Z0-9_\.]*)$ server/php/plugins/Payout/receiver_account_ipn.php?gateway_id=$1&user_id=$2&hash=$3 [NC] | |
RewriteRule ^ipn/process_ipn/([0-9]*)/hash/([a-zA-Z0-9_\.]*)$ server/php/plugins/SudoPay/process_ipn.php?course_user_id=$1&hash=$2 [NC] | |
RewriteRule ^certificate/([0-9]*)/([a-zA-Z0-9_\.]*)/([a-zA-Z]*)$ server/php/certificate.php?course_user_id=$1&hash=$2&type=$3 [NC] | |
RewriteRule ^ipn/paypal_process_ipn/([0-9]*)/hash/([a-zA-Z0-9_\.]*)$ server/php/plugins/PayPal/paypal_payment_process_ipn.php?course_user_id=$1&hash=$2 [NC] | |
RewriteRule ^ipn/process_ipn/user_subscription_logs/([0-9]*)/hash/([a-zA-Z0-9_\.]*)$ server/php/plugins/SudoPay/process_ipn.php?user_subscription_logs_id=$1&hash=$2 [NC] | |
RewriteRule ^ipn/paypal_process_ipn/user_subscriptions/([0-9]*)/hash/([a-zA-Z0-9_\.]*)$ server/php/plugins/PayPal/paypal_subscription_process_ipn.php?user_subscription_id=$1&hash=$2 [NC] | |
RewriteRule ^download_resume/([a-zA-Z_]*)/([0-9]*)/(.*)$ /server/php/download_resume.php?model=$1&id=$2&filename=$3 [NC] | |
RewriteRule ^download_message_content/([a-zA-Z_]*)/([0-9]*)/(.*)$ /server/php/download_resume.php?model=$1&id=$2&filename=$3 [NC] | |
RewriteRule ^download/([0-9]*)/([a-zA-Z0-9_\.]*)/([a-zA-Z0-9_\.]*)$ server/php/download.php?id=$1&hash=$2&type=$3 [NC] | |
# RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$ | |
# RewriteRule ^$ server/php/plugins/SEO/seo.php$1 [QSA,L] | |
RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit/1.1|Facebot|Twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|Pinterest|Google.*snippet|/externalhit_uatext/|Slackbot|Slack-ImgProxy|Slackbot-LinkExpanding|Site\ Analyzer|SiteAnalyzerBot|Viber|Whatsapp|Telegram [NC,OR] | |
RewriteCond %{QUERY_STRING} _escaped_fragment_ | |
RewriteRule ^$ server/php/plugins/SEO/seo.php$1 [QSA,L] | |
RewriteRule ^$ client/build/[QSA,L] | |
RewriteRule ^docs$ client/build/docs/index.html [QSA,L] | |
RewriteRule ^ag-admin$ client/build/ag-admin/index.html [QSA,L] | |
RewriteRule ^(templates-app.js|templates-common.js)$ client/build/$1 [QSA,L] | |
RewriteRule ^(assets|api_explorer|docs|ag-admin|admin|vendor|src)/(.*)$ client/build/$1/$2 [QSA,L] | |
RewriteRule ^favicon.ico$ client/favicon.ico [L] | |
RewriteRule ^apple-touch-icon(.*)$build/ client/build/apple-touch-icon$1 [L] | |
# Don't rewrite files or directories | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
# Rewrite everything else to index.html to allow html5 state links | |
RewriteRule ^ client/build/index.html [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nginx-config.conf
server {
listen 80;
server_name tef-lms-api.localhost tef-lms-api.demo.agriya.com;
}