Pointing 2 different paths to the same Apache domain name
<VirtualHost *:80>
##ServerAdmin webmaster@treoinfotech.com
DocumentRoot "/var/www/xampp/htdocs/tre
o"
ServerName treo.biz
ServerAlias
www.treo.biz
</VirtualHost>
<VirtualHost *:80>
##ServerAdmin webmaster@treoinfotech.com
DocumentRoot "/var/www/xampp/htdocs/blo
g"
ServerName blog.treo.biz
</VirtualHost>
I want to change blog.treo.biz to treo.biz/blog
Alias can do this method but have no idea how to do it. Have google it but failed Please help
Please give solution for both ubuntu and centos
blog is in wordpress and treo.biz is in laravel
DocumentRoot "/var/www/xampp/htdocs/tre
Or you can put an htaccess using mod rewrite to change the URL -- put the .htaccess in the virtual host root for the blog:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://treo.biz/blog$1 [R=301,L]