Skip to content

Instantly share code, notes, and snippets.

@Sharifur
Created December 10, 2022 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sharifur/124f21584acd39a0e00fafce5fdf5dda to your computer and use it in GitHub Desktop.
Save Sharifur/124f21584acd39a0e00fafce5fdf5dda to your computer and use it in GitHub Desktop.
showing unauthenticated in api
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment