Yii Framework Forum: Url Customization - Yii Framework Forum

Jump to content

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

Url Customization how to remove www from url Rate Topic: -----

#1 User is offline   Najmul 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 13-March 12

Posted 08 February 2013 - 03:20 PM

I am new Yii framework.

Trying to having url like https://example.com
while requesting with http://www.example.com

You can have this kind of example by requesting http://www.twitter.com

Please help me out.

Thanks
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 08 February 2013 - 05:07 PM

/* moved to General Discussion */
(not a tip, snippet or tutorial)
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#3 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 17-June 11

Posted 08 February 2013 - 05:29 PM

if apache server, mod_rewrite is where to look at.

here is what i googled, in your .htaccess

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

I enjoy the Yii.sy coding life here.
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