Yii Framework Forum: Setup shared hosting - Yii Framework Forum

Jump to content

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

Setup shared hosting Rate Topic: -----

#1 User is offline   tuga 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 69
  • Joined: 02-January 10

Posted 04 May 2010 - 07:36 AM

Please can someone help me for the setup on a shared hosting. I cannot get the site to work properly. In my localhost everything worked fine because I had a virtualhost in the apache config, but in shared hosting I cannot change the virtual host (I think). I'm a bit desperate as the site is complete and I cannot get it to work.

My site structure is:
/public_html/public (where are the files)

In /public_html/ I have a .htaccess with:
RewriteEngine On

# Exclude some directories from URI rewriting
#RewriteRule ^(dir1|dir2|dir3) - [L]

RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

and on /public_html/public/ I have another .htaccess with :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

I can go to the index page but then doesn't change to the others, also the links showing are wrong as it shows http://www.mysite.com/public/about and should be http://www.mysite.com/about

Can someone please help or guide me to a solution for this.

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,556
  • Joined: 12-October 09
  • Location:Croatia

Posted 04 May 2010 - 08:00 AM

public_html/public is a subfolder of the main web folder... so in the browser address bar would be always the public portion eg. yourdomain.com/public/...

why don't you put everything in the public_html folder and keep the framework in yii
Find more about me.... btw. Do you know your WAN IP?

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