Hi Draz,
I am getting the same error. Did you resolve your 404 error?? if yes please let me know the solution.
Thank you.
Hi Draz,
I am getting the same error. Did you resolve your 404 error?? if yes please let me know the solution.
Thank you.
I got the 404 error solved. I had to make a little change to my httpd.conf âŚ
<Directory "C:/Apache/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
Though i had AllowOverride set to âAllâ for all directories, above directory pointing to htdocs override AllowOverride to None, so i was not able to get rid of index.php in URI⌠Now changed it to ALL⌠Everything is working like a GemâŚ
Thank you.
HBK
If itâs not working even after putting all those rewrite rules in the .htacsses file, please check the .htacsses file location because by default it is located inside /protected folder.
.htacsses should be in the root location.
Hi
i changed my main.php
âurlManagerâ=>array(
'urlFormat'=>'path', 'showScriptName'=>false,
'rules'=>array(
'Home'=>'site/index',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
but error showing that "Not Found"
I think this may be the piece you may have been missing. This in the httpd.conf file.
how can hide index.php
edit webapp/protected/.htaccess
Options +FollowSymLinks
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
and use âshowScriptNameâ=>false, in config/main
iapply these changes on localhost and
after these changes index.php has been hide but when we click on other links then that links are not working
there is not found error is occurred
1.I think you must have not restarted your Apache Services. Check if thereâs a tick mark on it now. If not it is still not enabled.
2.I have successfully removed index.php (Both on Local and Windows Server). Place this file in the root directory.Same level as of "Protected folder".Find my .htacess code below :
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
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false, //Add This Line
'caseSensitive'=>false, //Add This Line
'rules'=>array(
/*Home Page Start*/
'' => 'site/index', //Note: See below
/*Home Page End*/
...
)..
NOTE : If your URL Management is successful, then you will not see site/index in your home url. As you can see in the above code, we have made it blank âââ=âsite/indexââ
HOPE THIS HELPS!! Cheers to YII.
I know this is an old topic, but for me since the Yii app was under a subdirectory, the redirect wouldnât work.
The fix was to include this line in the htaccess:
RewriteBase /
You might need to change the / to something else.
I hope this would be better
Options +FollowSymLinks
IndexIgnore */*
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/site/$1
#RewriteRule ^(.*)$ index.php?r=site/$1
#RewriteRule ^(.*)$ index.php/$1 [L]
#RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule . index.php
RewriteRule ^([a-z0-9\-]+)/$ index.php
AddOutputFilterByType DEFLATE text/html text/xml text/css text/javascript
uncomment url forwarding one by one to fit your requirement