Yii Framework Forum: Urlmanager Problem With Linux Ubuntu Server - Yii Framework Forum

Jump to content

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

Urlmanager Problem With Linux Ubuntu Server 'showScriptName'=>false, is not working Rate Topic: -----

#1 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 850
  • Joined: 20-April 11
  • Location:India

Posted 16 January 2013 - 02:45 AM

when i set 'showScriptName'=>false

'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>',
			),
		),


is not working with my linux ubuntu server, its working in my local wamp.

is there any solution?
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#2 User is offline   Emile Bons 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 19-September 11
  • Location:Breda, The Netherlands

Posted 16 January 2013 - 06:16 AM

Can you specify what isn't working? Do you mean that when you use createUrl, you get an url containing the script name?
0

#3 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 850
  • Joined: 20-April 11
  • Location:India

Posted 17 January 2013 - 01:15 AM

View PostEmile Bons, on 16 January 2013 - 06:16 AM, said:

Can you specify what isn't working? Do you mean that when you use createUrl, you get an url containing the script name?


no the url is without index.php, the the url is not found error
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
1

#4 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 17 January 2013 - 03:03 AM

Is it a Yii error page that you see or an error page from your webserver (Apache, nginx, ...)?

In the latter case the server probably ignores your .htaccess file. That's pretty common. For Apache you can allow .htaccess files by adding this to your VirtualHost section in the Apache config file:

<Directory "/path/to/your/webroot">
    AllowOverride All
</Directory>



You may already have such a Directory block in your config. It's fine to add AllowOverride All there.

Alternatively you can also add the required mod_rewrite rules directly to the config file (which is slightly faster, because Apache doesn't have to look for changed .htaccess files on every request).
1

#5 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 850
  • Joined: 20-April 11
  • Location:India

Posted 29 January 2013 - 08:22 AM

View PostMike, on 17 January 2013 - 03:03 AM, said:

Is it a Yii error page that you see or an error page from your webserver (Apache, nginx, ...)?

In the latter case the server probably ignores your .htaccess file. That's pretty common. For Apache you can allow .htaccess files by adding this to your VirtualHost section in the Apache config file:

<Directory "/path/to/your/webroot">
    AllowOverride All
</Directory>



You may already have such a Directory block in your config. It's fine to add AllowOverride All there.

Alternatively you can also add the required mod_rewrite rules directly to the config file (which is slightly faster, because Apache doesn't have to look for changed .htaccess files on every request).


yes mike the problem solved. its not only related to .htaccess, but also related to some other access in the server...
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
1

#6 User is offline   Devendra411 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 151
  • Joined: 09-April 13
  • Location:Bangalore

Posted 02 May 2013 - 03:23 AM

View PostRajith R, on 29 January 2013 - 08:22 AM, said:

yes mike the problem solved. its not only related to .htaccess, but also related to some other access in the server...





HI, Rajith, i'm also getting face same problem, where i need to change. pls help me.
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