Urlrewrite to don't show/write a folder in the address

Page 1 of 1

0 Replies - 5822 Views - Last Post: 14 June 2012 - 10:36 AM

#1 Alhazred

Reputation: 9
• Posts: 194
• Joined: 25-July 07

Urlrewrite to don't show/write a folder in the address

Posted 14 June 2012 - 10:36 AM

I'm doing some try on my pc with Linux.
For a webapplication I'll have to make /var/www/fw/ the home.
Inside fw folder I have now an index.html file with a simple message to see if it is shown and anothe index.html file with another message inside www folder.

I'm trying to write some rules in the .htaccess so that if I put http://loaclhost as address, Apache will show me the index.html placed inside fw folder.

I've tried these reules

RewriteEngine On
RewriteCond %{REQUEST_URI}!^/fw/
RewriteRule (.*) fw/\$1 [QSA,L]

but if I write http://localhost I see the index.html placed inside www folder, if I write http://localhost/fw I have an internal server error.

How do I have to correct the rules?

Is This A Good Question/Topic? 0

Page 1 of 1

 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}