Here is a solutions for masking the URL and to make them as sticky URL
Also see the Virtual host concept has been implemented along with that...!!!
- Code: Select all
<VirtualHost *:80>
ServerName www.site1.com
DocumentRoot "/var/apache/htdocs/folder../melon/en"
Alias /common/ /var/apache/htdocs/folder../common/
# Alias /images/ /var/apache/htdocs/folder../melon/en/images/
Alias /melon/en/ /var/apache/htdocs/folder../melon/en/
<Directory "/var/apache/htdocs/folder../melon/en">
Options -Indexes FollowSymLinks MultiViews +Includes
AddType text/html .shtml .inc .html
AddHandler server-parsed .shtml .html .htm
Allow from all
</Directory>
#DirectoryIndex index.html
RewriteEngine on
RewriteRule ^(/melon/en/)(.*)$ http://%{HTTP_HOST}/$2 [R=301,L]
ErrorLog /var/apache2/logs/error_log
TransferLog /var/apache2/logs/access_log
</VirtualHost>
Here i am trying to mask or remove the melon/en from the URI to make them sticky throughout the Application.
- Code: Select all
RewriteRule ^(/melon/en/)(.*)$ http://%{HTTP_HOST}/$2 [R=301,L]
Here is what is done ^ stands for start with /melon/en .... *
%(HTTP_HOST) is the actual domain name /$2
$2 holds the remains of URI removing the /melon/en/
while $1 holds the clipped path (/melon/en/)
HTTP_HOST - www.yourdomain.com
(.*) from all
And thats how a sticky URL is done...!!!
Hope this would be fruitful to you guys...!!!
regards,
Sudhakar R.