Yii Framework Forum: redirect to web folder - Yii Framework Forum

Jump to content

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

redirect to web folder Rate Topic: -----

#1 User is offline   willowl 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-December 10

Posted 24 August 2017 - 06:13 AM

sorry I know this is a question several times answered, but after a few days I can't solve the problem.

I need to publish my Yii2 application in a server with a Joomla previously installed.
The joomla .htaccess config file is causing me problems because every request is redirected from mysite.com/resource to mysite.com/en/resource

I have this folder tree in my apache server

.htaccess (for joomla)

I want that when the user writes mysite.com/yiiproject/ the server redirects to my app. By now I can't achieve it.
I've tried several .htaccess configurations.

My best try, was been create this .htacces under the web folder:
RewriteBase /
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/web
RewriteRule ^(.*)$ web/$1 [L]

This configuration goes well but the problem is I must to write directly mysite.com/yiiproject/web and I prefer to hide the /web part

Please, can someone help me?
Thank you.

#2 User is offline   Federico Benedetti 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 179
  • Joined: 11-June 14
  • Location:Italy - Pesaro

Posted 26 February 2018 - 04:56 PM

Hi, have you found a good solution? Thank's

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