Upload .htaccess
This commit is contained in:
parent
fbcb0d063f
commit
9e55e69677
1 changed files with 44 additions and 0 deletions
44
NostolgaGram/.htaccess
Normal file
44
NostolgaGram/.htaccess
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# 1. Activate the Apache URL Rewriting Engine
|
||||
RewriteEngine On
|
||||
|
||||
# 2. Safety Rule: If a real file or folder exists on the server, load it normally
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
||||
# ====================================================================
|
||||
# 3. MODULAR API ROUTING MATRIX (Instagram 6.20.2 Specific Endpoints)
|
||||
# ====================================================================
|
||||
|
||||
# --- ACCOUNTS MODULE ---
|
||||
RewriteRule ^api/v1/accounts/login/?$ api/v1/accounts/login.php [QSA,L]
|
||||
RewriteRule ^api/v1/accounts/register/?$ api/v1/accounts/register.php [QSA,L]
|
||||
RewriteRule ^api/v1/accounts/upload_profile_pic/?$ api/v1/accounts/upload_profile_pic.php [QSA,L]
|
||||
RewriteRule ^api/v1/accounts/logout/?$ api/v1/accounts/logout.php [QSA,L]
|
||||
RewriteRule ^api/v1/accounts/current_user/?$ api/v1/accounts/current_user.php [QSA,L]
|
||||
RewriteRule ^api/v1/users/check_email/?$ api/v1/users/check_email.php [QSA,L]
|
||||
|
||||
# --- FEED & TIMELINE MODULE ---
|
||||
RewriteRule ^api/v1/feed/timeline/?$ api/v1/feed/timeline.php [QSA,L]
|
||||
RewriteRule ^api/v1/feed/user/(.*)/?$ api/v1/feed/user.php?user_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/feed/liked/?$ api/v1/feed/liked.php [QSA,L]
|
||||
RewriteRule ^api/v1/feed/popular/?$ api/v1/feed/popular.php [QSA,L]
|
||||
|
||||
# --- MEDIA INTERACTION MODULE (Likes & Comments) ---
|
||||
RewriteRule ^api/v1/media/(.*)/like/?$ api/v1/media/like.php?media_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/media/(.*)/unlike/?$ api/v1/media/unlike.php?media_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/media/(.*)/comments/?$ api/v1/media/comments.php?media_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/media/(.*)/comment/?$ api/v1/media/comment_add.php?media_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/media/([0-9_]+)/delete/?$ api/v1/media/delete.php?media_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/media/upload/?$ api/v1/media/upload.php [QSA,L]
|
||||
RewriteRule ^api/v1/media/configure/?$ api/v1/media/configure.php [QSA,L]
|
||||
|
||||
# --- SOCIAL GRAPH MODULE (Follow / Unfollow / Profiles) ---
|
||||
RewriteRule ^api/v1/users/(.*)/info/?$ api/v1/users/info.php?user_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/friendships/create/(.*)/?$ api/v1/friendships/follow.php?user_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/friendships/destroy/(.*)/?$ api/v1/friendships/unfollow.php?user_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/friendships/show/(.*)/?$ api/v1/friendships/show.php?user_id=$1 [QSA,L]
|
||||
|
||||
# --- DIRECT MESSAGING MODULE ---
|
||||
RewriteRule ^api/v1/direct_v2/inbox/?$ api/v1/direct_v2/inbox.php [QSA,L]
|
||||
RewriteRule ^api/v1/direct_v2/threads/([0-9]+)/?$ api/v1/direct_v2/threads.php?thread_id=$1 [QSA,L]
|
||||
RewriteRule ^api/v1/direct_v2/threads/broadcast/?$ api/v1/direct_v2/broadcast.php [QSA,L]
|
||||
Loading…
Add table
Reference in a new issue