Edit or create .htaccess in your root folder
RewriteEngine On # Redirect to WWW RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # Hide robot.txt RewriteRule ^robots.txt - [L] # End the processing, if a rewrite already occurred RewriteRule ^(frontend|backend)/web/ - [L] # Rule for Images folder RewriteCond %{REQUEST_URI} /(images) RewriteRule ^images/(.*)$ images/$1 [L] # Handle the case of backend, skip ([S=1]) the following rule, if current matched RewriteRule ^backend(/(.*))?$ backend/web/$2 [S=1] # handle the case of frontend RewriteRule .* frontend/web/$0 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+/web)/.*$ $1/index.php
Edit or create htaccess in frontend/web
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L]
You can now access to frontend:
And backend:
Comments
Swapnil c*i*k*s*a*n*l@gmail.com
thank you
Write comments