Hi,
First of all, I am not into Linux (never worked before) or into Apache. Basically I am .NET developer. Due to some wired situation, I need to set up a site in CentOS . After lot of studies & trial - error method, I have managed to host the site in working condition as follows -
http://Server_IP:8000
As per client requirements, all files has been kept on custom location - /home/mydl/apps/layers_v1/htdocs . There are lots of PHP files here (named as data_A1.php, data_a2.php and so on).After changing few settings & PATH variables, I could able to open the site as below -
http://Server_IP:8000/layers_v1/htdocs/data_a1.php
Above mentioned URL types are working very fine. But now customer has given another requirement. Whenever a user calls "http://Server_IP:8000/layers_v1/htdocs/data_a1.php" , he/she should see "http://Server_ip/a1.php".
After lots of googling, I think, this may be done with .htaccess / httpd.conf file. As I am very new with Linux & Apache, I could not able to understand the details properly. I tried to write following lines on .htaccess file, but it didn't work.
RewriteEngine on
RewriteBase /layers_v1/htdocs/
RewriteRule data_(.*)?$ /$1 [L]
Can anyone help me out to fix this issue?? It will be very helpful for me.
Please note that am not into Linux or administration part.