Skip to content

Instantly share code, notes, and snippets.

@stephenjude
Created January 23, 2021 02:48
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 stephenjude/38591892a6760956a576998e71b472f7 to your computer and use it in GitHub Desktop.
Save stephenjude/38591892a6760956a576998e71b472f7 to your computer and use it in GitHub Desktop.
#redirect setup for laravel project on primary domain on a shared server
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?prep50mobileapp.com.ng$
RewriteCond %{REQUEST_URI} !^/blog/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blog/public/$1
RewriteCond %{HTTP_HOST} ^(www.)?prep50mobileapp.com.ng$
RewriteRule ^(/)?$ blog/public/index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment