Yii Framework Forum: Hiding “Index.php” At Url In “Yii” When Using “Https” Does Not Work - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hiding “Index.php” At Url In “Yii” When Using “Https” Does Not Work Rate Topic: -----

#1 User is offline   Ashok Poudel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 02-March 12

Posted 17 June 2013 - 12:45 AM

here i am stuck with a small problem. I have a site built in Yii framework. It runs without any problem with http protocol (the index.php in url is hidden and all urls work fine). I have hosted this in amazon ec2 services. i have the following lines in my .htaccess file
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

but when i use https to browse the site (note: i have it all configured) , the home page loads normally. but the other urls does not work and requires /index.php/ to be added. what am i missing here?

dying for answers.

thanks in advance.
0

#2 User is offline   mbala 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 156
  • Joined: 21-July 12
  • Location:Chennai, Tamilnadu, India

Posted 17 June 2013 - 01:22 AM

have you done below changes in url manager.

'urlManager'=>array(
    'urlFormat'=>'path',
    'rules'=>array(
        '<controller:\w+>/<id:\d+>'=>'<controller>/view',
        '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
        '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
       ),
  ),
'showScriptName'=>false,


0

#3 User is offline   Ashok Poudel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 02-March 12

Posted 17 June 2013 - 01:27 AM

yep ! this is exactly what i have in my config file.

'urlManager'=>array(
			'urlFormat'=>'path',
        	'showScriptName'=>false,
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users