If a user is in a page www.sitename.com/folder/index.php and he clicks on a url to another page/site but the second page should not detect that the user is coming from www.sitename.com/folder/index.php instead it should show www.sitename.com/someting/somethingelse
in short I want to manipulate the source url
is the htaccess rewrite going to help ?
For example:
in your page:
<a class='redirectable' href='somewhere'>Link1</a>
<a class='redirectable' href='somewhere'>Link2</a>
<a href='somewhere'>Link3</a>
$(document).ready(function(){
$('.redirectable').click(function(e){
e.preventDefault();
window.location = 'myRedirectPage.php?target=' + $(this).attr('href');
});
});
in myRedirectPage.php:
<?php
if(!empty($_GET['target']))
header('Location: '+trim($_GET['target']));
I agree with Mojtaba.
From original page, you can link to www.sitename.com/someting/somethingelse, which automatically redirects to target page.