Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mod_rewrite how to change ip to html?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Sun Jul 07, 2013 7:01 pm    Post subject: mod_rewrite how to change ip to html? Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum