Skip to content

Instantly share code, notes, and snippets.

@MagedAhmad
Created November 15, 2019 14:59
Show Gist options
  • Select an option

  • Save MagedAhmad/496c82c1e0b01f7b9516ecedde74ae4b to your computer and use it in GitHub Desktop.

Select an option

Save MagedAhmad/496c82c1e0b01f7b9516ecedde74ae4b to your computer and use it in GitHub Desktop.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment