Reputation: 1025
We had build one project in yii2. It is working fine on local server. But it not working on shared server. I tried lot in htaccess but still not working for me.It gives me 500 internal server error
Frontend htaccess :
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
Backend htaccess
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
How can i solve this problem ?
Upvotes: 0
Views: 850
Reputation: 26
Probably the server does not support 16-bit .php files. Some editors (such as Notepad on Windows) will always add a byte-order mark (BOM) when you save a file as UTF-8, so make sure you use a text editor where you can save the file without the BOM. I had exactly the same problem and it took me ages to debug the problem because the text in both formats looks identical when viewed. The problem is quite a show-stopper when using session_start() because the file must begin with
Upvotes: 1