Yii2 move code from one pc’s localhost to other pc’s localhost

I am new to Yii2. I am using advanced template of Yii2.

I have code which works in one PC’s localhost server, but when i copied it on other PC’s localhost sever it gives me an internal server error.

.htaccess file in advanced/ folder

Options +FollowSymlinks
RewriteEngine On

# deal with admin first
RewriteCond %{REQUEST_URI} ^/advanced/(admin) 
RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L]
RewriteRule ^admin/css/(.*)$ backend/web/css/$1 [L]

RewriteCond %{REQUEST_URI} !^/advanced/backend/web/(assets|css)/  
RewriteCond %{REQUEST_URI} ^/(admin)  
RewriteRule ^.*$ backend/web/index.php [L]

RewriteCond %{REQUEST_URI} ^/advanced/(assets|css)  
RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]

RewriteCond %{REQUEST_URI} !^/advanced/(frontend|backend)/web/(assets|css)/  
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ frontend/web/index.php

.htaccess file in advanced/backend/web/ folder

RewriteEngine on

# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php

Is there anything wrong i have done? Please help..

Apache rewrite module is enables.

Source: .htaccess

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.