Assumption: I have deployed 3 websites under /var/www (i.e. 3 directories, a, b, c), and there is also an index.html
under /var/www
Now the domain name example.com has been mapped to the server IP
When accessing directly through example.com, you will see index.html
example.com/a is visiting website a
example.com/b is accessing website b
example.com/c is accessing the c website
If I want to achieve this effect now:
example.com/b or example.com/b/xxxx is visiting website b
example.com/c or example.com/c/xxxx is visiting the c website
example.com is visiting a website
How to configure?
Thanks!
Can I use the rewrite function
Place a .htaccess file under example.com/b/xxxx and use regular expression matching in it
^b/xxxx/$ b/$1
Finally, in httpd.conf (/etc/httpd/conf/httpd.conf), change 'AllowOverride None' to 'AllowOverride All' (if necessary)