PHP - change first directory in url and keep remaining directories -


i have 2 language website, english , russian;

english version: www.example.com russian version: www.example.com/ru/

looking @ example below, how can direct php add ru directory after domain , keep remaining url of current page forexample, if current page url is: http://example.com/newyork/car/

then want change link to: http://example.com/ru/newyork/car/">russian

use fetch requested url..

$return_url = base64_decode($_get["return_url"]); //return url 

if need provide link original page use

//redirect original page <a href="<?php echo $return_url; ?"> </a> 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -