Connecting Tech Pros Worldwide Forums | Help | Site Map

How to show shortened url in the address bar

Newbie
 
Join Date: Apr 2008
Posts: 1
#1: Apr 3 '08
Hi...

Would someone please be kind enough to help me with php code to insert into my webpage?

I have a site that shortens a url. It uses an SQL DB. (not important for this, I believe)

I need the php code to keep the shortened url in the address bar after redirecting to the landing page. The way it works now is that it shortens the url but the original url shows in the address bar after reaching the landing page.

Would someone please help me out here?

I hope I am allowed to put the url here? I am not promoting the site. I can not even use it the way it is now.

Moderators, delete this if it is not ok to be here. Thank you.

URL: <DOMAIN REMOVED> - Moderator

If you would like, I will give you a free webhosting account for helping me get this the way I want it.
(pretty fast server) cPanel, Fantasico, RV Skin, TV Sitebuilder... the works.

Thank you,
John

<EMAIL REMOVED> - Moderator

TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#2: Apr 3 '08

re: How to show shortened url in the address bar


I think what you're after is using mod rewrites in your htaccess file...

Kind big, but have a little look at this, in particular the RewriteCond and RewriteRule. Post back with any more questions.
ak1dnar's Avatar
Moderator
 
Join Date: Jan 2007
Location: Colombo
Posts: 1,440
#3: Apr 3 '08

re: How to show shortened url in the address bar


Original Thread title "Lil php help please...." replaced with the current one.
Please make sure to use a good thread title that describes your question/situation.
Thanks
Reply