Remove Public From URL

In this guide you will know how to remove public from url.

To Remove public from url your server must have enabled the mod_rewrite. header to check whether it's enabled or not you can run following http://yourdomain.com/phpinfo and check according to screenshot

Go to Admin / Help and Support / Remove public and force https and click on remove public button.

Remove public only work on main domain or subdomain. It will not work on if you running script on subfolder.

โš™๏ธ Remove Public Manually.

Create a .htaccess file (if not created) on root and paste below code and try to run site without public.

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

๐Ÿš€ Remove public with Force HTTPS

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] 
	RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Last updated