I have a path like this
http://host.ip/nl/producten-en-diensten/abonnementen-met-gsm
which will retrieve the correct content and I also want to receive the same content when I access the below URL also
http://host.ip/nl/business/producten-en-diensten/abonnementen-met-gsm
Note:
host.ip/nl/
- Staticproducten-en-diensten/abonnementen-met-gsm
- Dynamic, it will change/business
keyword will append next tonl
I have referred to the rule given in this post: How can I create a shorter alias URL to a longer URL using an .htaccess file?
but no success
@Magento URL rewrite management will do exactly this, but I am trying to achieve this using .htaccess
.
I have tried like this but it is redirecting
RewriteRule (^|.*?/)nl/business/(.*)$ /$1nl/$2 [R=302,L,NC]
Here is my rewrite tag in .htaccess
<IfModule mod_rewrite.c>
############################################
## Enable rewrites
Options +FollowSymLinks
RewriteEngine on
## Business Rewrite
RewriteRule (^|.*?/)nl/business/(.*)$ /$1nl/$2 [NC]
############################################
## You can put here your magento root folder
## path relative to web root
#RewriteBase /magento/
############################################
## Workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
############################################
## Never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## Rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>