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

#1 Alhazred  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 200
  • 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