Removing App Folder Name From Url

Okay seems like this is a pretty common problem, but I can’t find a definitive solution on the forums.

My Yii is set up like this

/webroot/framework

/webroot/app

/webroot/requirements

the app folder hosts the yii application

however my url looks like : site[dot]com/app/site/index

How do I remove the ‘app’ portion from the URL.

I tried moving my .htaccess file to the webroot folder and it redirects but ‘app’ still shows up in the url

Here are the contents of /webroot/.htaccess


<IfModule mod_rewrite.c>

  RewriteEngine On

 RewriteBase /

  

 # need this for AMZN ELB or get a infinite redirect loop 

 RewriteCond %{HTTP:X-Forwarded-Proto} !https

 RewriteCond %{SERVER_NAME} !^localhost$

 RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI} [L]

 

 RewriteCond %{REQUEST_FILENAME} !-f

 RewriteCond %{REQUEST_FILENAME} !-d

 

RewriteRule . /app/index.php 

</IfModule>



I would be easy if I could just change my webroot to /webroot/app but I can’t control that. Thanks for any help

you dont need .htaccess to achive this.

btw, you also dont need requirements folder in production server its only a checker.

the quick answer would be this file structure:

framework/webroot

webroot/<app folder CONTENT>

that is it :wink:

Hi, where you able to resolve this? I have the same problem.

Thanks

if you have the same problem you can use the same method, or let me know if you have other probelm :)

thank you.