rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Sun Jul 07, 2013 7:01 pm Post subject: mod_rewrite how to change ip to html? |
|
|
Hi, In apache I try to change when i put ip adress: 192.168.1.1 in web browser to show me instead ip in webbrowser some name of page: e.g: mysite.com
I have installed and enabled mod_rewrite.
I put this in /etc/apache2/sites-enabled/000-default:
Quote: | <VirtualHost *>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^192\.168\.1\.1
RewriteRule (.*) mysite.com/$1 [R=301,L]
DocumentRoot /var/www/forum
<Directory /var/www/forum>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
|
This rule redirects me to mysite.com, but I dont want to redirect, just change name in address panel of webbrowser from ip to mysite.com....
Can you help? thanks |
|