A
A
Anton2014-10-14 20:04:31
Yii
Anton, 2014-10-14 20:04:31

How to remove /web/ from Yii 2.0 URL?

Hello!
I installed basic Yii 2.0, but here's the problem - the site is available on localhost/web/, but it needs to be without "web". How to remove, tell me, please?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry, 2014-10-14
@ExileeD

Transfer the contents of the web folder to the rootdirectory Put
the rest above the rootdirectory

S
slvABTOP, 2014-10-14
@slvABTOP

and configure the web server so that the root directory is /basic/web?

N
Nick Murzin, 2014-10-15
@R0s0maxa

Try something like this in .htacess

AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
DirectoryIndex basic/web/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . basic/web/index.php

A
Anton, 2014-10-16
@hummingbird

Guys. Found such a post - TyTs . It works well on advence, but only the url does not suit the view - ang.site.ru/frontend/web/. Tell me how to cut off the last 2 "directories"?

I
Igorrebega, 2014-10-19
@Igorrebega

I also suffered with this ... What server do you have?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question