maybe mod_rewrite not enabled? show version of your http server
maybe mod_rewrite not enabled? show version of your http server
This error is caused by some command in the .htaccess, try to leave only this in the .htaccess
RewriteEngine on
# 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
If you get still the server error code, than mod_rewrite is not enabled!
I also get my Linux hosting from Godaddy and can confirm that rewrites are enabled. My .htaccess looks like this:
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# Make backend accessible via url: http://site/backend.
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]
The last line is critical because a single period is not enough. You have to have all the other characters for it to work. Check it out and good luck.
Hello, today I got the same problem with a domain at http://1und1.de
Thanks to JFReyes it works now
Too bad that I can’t investigate the apache log to tell you the exact error
Why is this not workng with me? I’m also using godaddy
I’ve been away from Yii work for a while but recently returned. I can confirm that something changed between my earlier post (Yii 1.1.2?) and the new version 1.1.7. I’ll investigate and ask around; if I find an answer I’ll post it here. Thanks.
Phew!
Got the solution to the ‘UrlManager + Godaddy’ saga.
This is how the .htaccess file should look. I tried to strip it down to the most required stuff.
RewriteEngine on
# 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]
See the question mark after ‘index.php’ in the last line? That is it. Just add the ‘?’ after index.php and it shall solve all your problems. No ‘Internal Server Error’ or ‘No Input File Specified’ errors anymore.
Cheers.
Does not seem like it is quite solved yet, I have the same issue…
Gaurav I used your suggestion below which worked for all of the pages contained in the yii/protected/views/site folder
However I have other pages to access e.g. yii/protected/views/folderA/index.php, yii/protected/views/folderB/index.php etc…
The absolute path is godaddy/html/yii/protected/views/folderA/index.php
The Yii Root framework is outside the web at godaddy/html/yiiroot
Any ideas this is driving me nuts (and of course all works smoothly on localhost)…
Thanks so much
N
BTW the error I get is the no input file specified…
You are te best! Thank you very much, this is perfect.
I was also facing same issue but i did this and it worked successfully
So posting it for some new user like me.
.htaccess – you need to place this file where index.php is there
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]
You need to uncomment url path format and add two more things
Set main.php in your yii configuration, at component :
'urlManager'=>array(
'urlFormat'=>'path',
[b] 'showScriptName'=>false,
'caseSensitive'=>false, [/b]
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
also you need
This is killing me. I followed the last post and I still keep getting "No input file specified."
I am hosted with godaddy and here is my .htaccess
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]
Here is my UrlManager in my main.php config file
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'caseSensitive'=>false,
'rules' => array(
'' => 'video/player',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
Anybody have any ideas, or maybe an suggestions on something obvious I could have missed. It works fine on my local. I didn’t use the yii tools to recreate the site, I just uploaded all the files from my local.
I don’t know about that last line of your .htaccess file. It definitely breaks my Yii application on godaddy. This is what I use for my .htaccess.
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
RewriteRule .* - [L]
I also used Goddady and nothing of what is explained here worked for me, better said, only worked for controllers like “PostController”, but having something like “PostCommentController” didn’t work, that’s due to capital letters, so I had to change all my controllers on this way “PostcommentController” (name file and class name).
Hope it helps to you!
Hi,
I have tried all the suggestions above on my shared linux hosting with godaddy, with no success I still get a file not found error.
BTW: Several of the suggestions above work fine on WAMP on my localhost.
Any suggestion on what to try next?
Hi all,
I am a newbie to the Yii framework and ran into the same issue using a GoDaddy LAMP hosted environment.
I resolved it by creating a php5.ini file in the root directory
my php%.ini file
cgi.fix_pathinfo = 1
my .htaccess file
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
RewriteRule .* - [L]
my urlManagerCode
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'caseSensitive'=>false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
Hope this helps!
Cheers!
Jeff Beasley
your idea s not work… i have same problem…!
Had the same issue at GoDaddy. Works fine for me with such .htaccess file:
Options -Indexes
RewriteEngine on
RewriteBase /
# 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 [NC,L]
CUrlManager configuration basically looks as always:
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'rules' => array(
// your rules
)
),
That’s all in my case.
Hi guys,
tried everything suggested in this thread, but with no luck. im using the default urlManager provided by Yii.
Maybe there is a menu somewhere in Goddy where i could enable mod_rewrite?
here is what i just noticed, using what is suggested above, mywebsite.com/controller/action/ is now working, but all the links provided by Yii(createUrl and in the main navigation) includes "index.php" outputs the link "mywebsite.com/index.php/controller/action/" which is not working, any work around for this?
solved with
‘showScriptName’=>false,
under urlManager in in the config file.