httpd.conf configuration need help

Hi, This is the set up of my httpd.conf to my yii application

Alias /attendance "C:/wamp/www/myproject/web"

<Directory "C:\wamp\www\myproject\web">

    # use mod_rewrite for pretty URL support

    RewriteEngine on

    # If a directory or a file exists, use the request directly

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    # Otherwise forward the request to index.php

    RewriteRule . index.php

    # ...other settings...


This works fine if I open up in browser

http://localhost/attendance /

but when I navigate to the page like about,contact,Login

it will use the myproject in the url like this

http://localhost/myproject /web/site/about

also as you can see that the web folder is appended in the url

how can I use my alias and remove the appended web in url

Thank you in advance.

Hi ezekel,

I believe that you need to add the following to your app config (config/web.php file):

'components' => [





Thank you for the reply what should I put in baseUrl ?

Thank you in advance.

In your case, you need to use:


Thank you it works