Setup shared hosting

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 and should be

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


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

why don’t you put everything in the public_html folder and keep the framework in yii