Bharu
Bharu

Reputation: 191

Internal Server Error in yii

Actually my website works in localhost, why do I get Internal Server Error in live? I have attached my .htaccess file here, are there any errors in it?

    Options +FollowSymLinks
    IndexIgnore */*
    RewriteEngine on

    # Make backend accessible via url: 
    RewriteRule ^sysadmin& backend.php

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule ^.*$ /index.php [L]

Upvotes: 0

Views: 2341

Answers (2)

Sarvar Nishonboyev
Sarvar Nishonboyev

Reputation: 13110

You should check your apache log. I had same problem, and I checked error log. There was an error that invalid command "RewriteEngine" It means rewrite module is disabled. You must enable it. For linux:

Under Apache 2+ you can simply do:

sudo a2enmod rewrite && sudo service apache2 restart
or
sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart 

Upvotes: 0

Alexander Schwarzman
Alexander Schwarzman

Reputation: 1639

Just try to add the following rule in your htaccess:

RewriteBase /

Upvotes: 1

Related Questions