views:

11

answers:

1

Hi all,

I need to redirect incoming requests for a page to a subdirectory whilst keeping the URL displayed as originally typed.

This is to manage language pages easier.

For example, I want Spanish pages to be under www.mydomain.com/es. I want the URL displayed to remain www.mydomain.com/es.

But the actual page is held here - www.mydomain.com/international/es

This means I can keep my root folder tidy and have all the language pages in one directory. But I want it to be easy for language specific visitors to find thier page.

Can anyone point me in the right direction? I've had a go but to be honest I always manage to produce server errors and get in a mess.

Many thanks

TT

+1  A: 

Provided you are on an apache server look up mod_rewrite.

Example for your .htaccess:

RewriteEngine on
RewriteRule ^es/([0-9a-zA-Z\/]*)$ /international/es/$1 [L]
Steve H
Just want I need. Works a treat. Many thanks
TheTub