I bought a website: josecvega.com
Whenever someone attempts to access http://www.josecvega.com it forwards these to my web-server.
I've switched on the mask, so when you achieve my web-server of IP, 220.127.116.11, still it shows http://www.josecvega.com, however when you click a hyperlink that can take you to definitely another location on my small web server, the http://www.josecvega.com vanishes and becomes the Ip. I'm presently trying to ascertain if mod_rewrite might help solve this issue.
This is exactly what I've to date in httpd.conf
RewriteCond % =18.104.22.168
I don't know the way the rule visits rewrite the URL.
I additionally realize that this problem isn't strictly associated with mod_rewrite, however i have attempted fixing it in several ways and non have appear to operate, I had been wishing that could be achieved with mod_rewrite.
Unsure mod_rewrite is pertinent. You need to configure your VirtualHost configurations to ensure that the ServerName can be used.
NameVirtualHost *:80 <VirtualHost *:80> ServerName josecvega.com ServerAlias www.josecvega.com DocumentRoot /var/www/vhosts/josecvega.com/htdocs <Directory /var/www/vhosts/josecvega.com/htdocs> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
This assumes obviously that you can get httpd.conf so it seems you need to do. You can include a lot more directives to
VirtualHost if you would like, but automatically it'll go to whichever the actual httpd.conf has for those configurations.
Obviously for those who have just one website in your server anyway, you can easily alter the
ServerName value within the primary httpd.conf file.