Ant,
Okay, it’s just hard to believe that the CMS (even Joomla) would add a key/value pair to a query string twice and the errant space was my typo.
4.) I’m not sure what you mean, the generated link that I’m trying to change does include the nl/ subdirectory in that it is www.seed-city.com/nl/index.php?page=checkout.index&option=com_virtuemart&Itemid=65&redirected=1&Itemid=65
It’s just I want to specify that there has to be a nl/ ja/ de/ preceding the index.php
Do you see from these two quotes why I’m confused? The earlier one (listed second) says that you want to insert a language subdirectory while the current one (the first listed above) says that you want to eliminate the language subdirectory. You really can’t have it both ways, can you?
Okay, to remove the nl subdirectory would be merely to use the code already provided above, i.e.,
RewriteCond %{QUERY_STRING} ^page=checkout.index&option=com_virtuemart&Itemid=65&redirected=1&Itemid=65$
RewriteRule ^nl/index\\.php$ index.php [R=301]
The R=301 would force Apache to display the redirection without the nl subdirectory but it would only work if index.php is in the DocumentRoot (the same directory as the .htaccess file).
To add the nl subdirectory is possible but would force your ja and de speakers to view the dutch language pages. If you were going to add a language specification, you need to provide SOMETHING to mod_rewrite to let it know which language to specify. As an aside, though, mod_negotiation is designed to handle that exact question as, from memory, it gets the preferred language from the visitor’s browser and attempts to match that in your site’s files. Because I’m firmly rooted in English, though, I’m of little use in guiding you through mod_negotiation.
Ill thought out? No, it’s merely a matter of communications - and I’ve already admitted to being firmly rooted in English (despite years of language classes). So long as I can explain what’s needed so you can understand, we’re all set.
RewriteCond %{QUERY_STRING} ^page=checkout.index&option=com_virtuemart&Itemid=65&redirected=1&Itemid=65$
RewriteRule ^/?index\\.php$ nl/index.php [R=301]
Note, please, that I’ve added /? after the ^ to cover both versions of Apache - Apache 1.x requires / after the ^ while Apache 2.x forbids the /.
WARNING: If Joomla is automatically generating the language subdirectory, please check the Joomla documentation as it would presumably accommodate that with its index.php file (as well as its own mod_rewrite code). Messing about with CMS can be very dangerous!
Regards,
DK