htaccess

Using Rewrite Rules

Turn on rewite

RewriteEngine On

Disallow access to .htaccess

RewriteRule ^.htaccess$ - [F]

if not page defined – forward to public/index.php folder

RewriteCond %{REQUEST_URI} =""
RewriteRule ^._$ public/index.php [NC,L]

if page in “public” folder, use that page

` RewriteCond %{REQUEST_URI} !^/public/._$ RewriteRule ^(.*)$ public/$1

Leave a Reply