I have my index.php inside a subfolder which is inside another subfolder, etc. So, my hosting company doesn't let me modify the httpd-vhosts.config so the only way I have to indicate that I want to run my web from /subfolder1/subfolder2.... is the .htaccess.
I've searched a lot in stackoverflow, and all the stuff didn't work. Basically, I have these folders :
- web
- instances
- myweb
- public
- root
- public
- myweb
- instances
Inside root, there is the index.php. So , when I enter at: www.mydomain.com.mialias.net, I want to go to index.php and run my website,
I've tried this :
RewriteEngine on
RewriteCond % ^midomain.com.mialias.net\.com$
RewriteRule (.*) http://www.midomain.com.mialias.net/$1 [R=301,L]
RewriteRule ^$ instances/myweb/public/root [L]
And it didn't work because the URL is like this : www.midomain.com.mialias.net/instances/myweb/public/root
, which is wrong because I need to have my URL like : www.midomain.com.mialias.net/ in order to insert arguments on the URL, like : www.midomain.com.mialias.net/myaccount
, and at the moment this is impossible because I have the URL as I said.
Does anyone know how to do it? Thank you very much!