/    Sign up×
Community /Pin to ProfileBookmark

If the URL address is something like this one [url]www.domain.com/t1/revs=xxx[/url]. How will i get the t1? t1 could be t2, t3, etc. t is a tour. In my content I got links which is href to [url]www.domain.com[/url]. I made a script that will look into the content and replace it with [url]www.domain.com/tx/revs=xxx[/url]. Can anybody help me?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@JupacFeb 16.2006 — the t1 t2 t3 are differnt direcotories
Copy linkTweet thisAlerts:
@mharzboneauthorFeb 16.2006 — the real domain is www.domain.com. tx/revs=xxx are added for referral.
Copy linkTweet thisAlerts:
@SheldonFeb 16.2006 — some thing like $_SERVER['REQUEST_URI'];

[code=php]
<?php echo("http://". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>
[/code]
Copy linkTweet thisAlerts:
@mharzboneauthorFeb 16.2006 — Thanks for the help guys. I got it already. www.domain.com/tx/revs=xxx where tx is does not exist or is not a folder. It is just used for referral. What I did is I made rewriterules on the .htaccess for www.domain.com/tx/revs=xxx to link to the right linking code which is www.domain.com/?t=x&revs=xxx. I also get the values of t and revs then add it to the links(www.domain1.com) of my content to make it www.domain1.com/tx/revs=xxx
×

Success!

Help @mharzbone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...