How to make URL cloaking

Hi Everybody,

I have a small question about URL cloaking, am working on an idea of
creating URL cloaking system, this is that my users can get cloaked
URLs for their long URLs in other words, if you have URL like this:
http://www.yourdomain.com/folder1/folder2/page.extension?gsh agaoj=dsfd+dfs
this link after cloaking may look like this: http://www.mydomain.com/page.htm
for example

I read on somewhere that this could be used using:
<?php
header("Location:http://www.yourdomain.com/page.extension?sd fs
+sdf=he3");
exit();
?>

but this URL code on one of my pages takes me to the location
specified in the code, and in the address bar the url found is
http://www.yourdomain.com/page.extension?sdfs+sdf=he3 not my own URL
hiding the other location (your URL)


Please help me how this works if anyone know

Thanks in advance

shror
shror [ Do, 24 Januar 2008 14:16 ] [ ID #1915601 ]

Re: How to make URL cloaking

shror wrote:
> Hi Everybody,
>
> I have a small question about URL cloaking, am working on an idea of
> creating URL cloaking system, this is that my users can get cloaked
> URLs for their long URLs in other words, if you have URL like this:
> http://www.yourdomain.com/folder1/folder2/page.extension?gsh agaoj=dsfd+dfs
> this link after cloaking may look like this: http://www.mydomain.com/page.htm
> for example
>
> I read on somewhere that this could be used using:
> <?php
> header("Location:http://www.yourdomain.com/page.extension?sd fs
> +sdf=he3");
> exit();
> ?>
>
> but this URL code on one of my pages takes me to the location
> specified in the code, and in the address bar the url found is
> http://www.yourdomain.com/page.extension?sdfs+sdf=he3 not my own URL
> hiding the other location (your URL)
>

Which is exactly how it should be. The Location header instructs the
browser to request the page from the new URL. And the browser will
display the new URL.

>
> Please help me how this works if anyone know
>
> Thanks in advance
>
> shror
>

The obvious question would be - why would you ever try to fool your
users like this?

You would have to serve the page from your site (i.e. with cURL).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ Do, 24 Januar 2008 14:23 ] [ ID #1915602 ]

Re: How to make URL cloaking

On Jan 24, 3:23 pm, Jerry Stuckle <jstuck... [at] attglobal.net> wrote:
> shror wrote:
> > Hi Everybody,
>
> > I have a small question about URL cloaking, am working on an idea of
> > creating URL cloaking system, this is that my users can get cloaked
> > URLs for their long URLs in other words, if you have URL like this:
> >http://www.yourdomain.com/folder1/folder2/page.extension?gs hagaoj=dsf...
> > this link after cloaking may look like this:http://www.mydomain.com/page.htm
> > for example
>
> > I read on somewhere that this could be used using:
> > <?php
> > header("Location:http://www.yourdomain.com/page.extension?sd fs
> > +sdf=he3");
> > exit();
> > ?>
>
> > but this URL code on one of my pages takes me to the location
> > specified in the code, and in the address bar the url found is
> >http://www.yourdomain.com/page.extension?sdfs+sdf=he3not my own URL
> > hiding the other location (your URL)
>
> Which is exactly how it should be. The Location header instructs the
> browser to request the page from the new URL. And the browser will
> display the new URL.
>
>
>
> > Please help me how this works if anyone know
>
> > Thanks in advance
>
> > shror
>
> The obvious question would be - why would you ever try to fool your
> users like this?
>
> You would have to serve the page from your site (i.e. with cURL).
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck... [at] attglobal.net
> ==================

Hi Jerry,

Thanks for your quick reply,
Am not trying to fool my users but what I want to do is to create
something like the short URL maker so that you can get small URL from
my website to use it with long ones at your own website, or to hide
the real URL if its long with a small one, so my whole idea is a free
service nothing more.
shror [ Do, 24 Januar 2008 14:42 ] [ ID #1915606 ]

Re: How to make URL cloaking

On Jan 24, 8:42 am, shror <shahi... [at] gmail.com> wrote:
> On Jan 24, 3:23 pm, Jerry Stuckle <jstuck... [at] attglobal.net> wrote:
>
>
>
> > shror wrote:
> > > Hi Everybody,
>
> > > I have a small question about URL cloaking, am working on an idea of
> > > creating URL cloaking system, this is that my users can get cloaked
> > > URLs for their long URLs in other words, if you have URL like this:
> > >http://www.yourdomain.com/folder1/folder2/page.extension?gs hagaoj=dsf...
> > > this link after cloaking may look like this:http://www.mydomain.com/page.htm
> > > for example
>
> > > I read on somewhere that this could be used using:
> > > <?php
> > > header("Location:http://www.yourdomain.com/page.extension?sd fs
> > > +sdf=he3");
> > > exit();
> > > ?>
>
> > > but this URL code on one of my pages takes me to the location
> > > specified in the code, and in the address bar the url found is
> > >http://www.yourdomain.com/page.extension?sdfs+sdf=he3notmy own URL
> > > hiding the other location (your URL)
>
> > Which is exactly how it should be. The Location header instructs the
> > browser to request the page from the new URL. And the browser will
> > display the new URL.
>
> > > Please help me how this works if anyone know
>
> > > Thanks in advance
>
> > > shror
>
> > The obvious question would be - why would you ever try to fool your
> > users like this?
>
> > You would have to serve the page from your site (i.e. with cURL).
>
> > --
> > ==================
> > Remove the "x" from my email address
> > Jerry Stuckle
> > JDS Computer Training Corp.
> > jstuck... [at] attglobal.net
> > ==================
>
> Hi Jerry,
>
> Thanks for your quick reply,
> Am not trying to fool my users but what I want to do is to create
> something like the short URL maker so that you can get small URL from
> my website to use it with long ones at your own website, or to hide
> the real URL if its long with a small one, so my whole idea is a free
> service nothing more.

So it's really the same thing as TinyURL?
zeldorblat [ Do, 24 Januar 2008 14:51 ] [ ID #1915607 ]

Re: How to make URL cloaking

shror wrote:
> On Jan 24, 3:23 pm, Jerry Stuckle <jstuck... [at] attglobal.net> wrote:
>> shror wrote:
>>> Hi Everybody,
>>> I have a small question about URL cloaking, am working on an idea of
>>> creating URL cloaking system, this is that my users can get cloaked
>>> URLs for their long URLs in other words, if you have URL like this:
>>> http://www.yourdomain.com/folder1/folder2/page.extension?gsh agaoj=dsf...
>>> this link after cloaking may look like this:http://www.mydomain.com/page.htm
>>> for example
>>> I read on somewhere that this could be used using:
>>> <?php
>>> header("Location:http://www.yourdomain.com/page.extension?sd fs
>>> +sdf=he3");
>>> exit();
>>> ?>
>>> but this URL code on one of my pages takes me to the location
>>> specified in the code, and in the address bar the url found is
>>> http://www.yourdomain.com/page.extension?sdfs+sdf=he3not my own URL
>>> hiding the other location (your URL)
>> Which is exactly how it should be. The Location header instructs the
>> browser to request the page from the new URL. And the browser will
>> display the new URL.
>>
>>
>>
>>> Please help me how this works if anyone know
>>> Thanks in advance
>>> shror
>> The obvious question would be - why would you ever try to fool your
>> users like this?
>>
>> You would have to serve the page from your site (i.e. with cURL).
>>
>
> Hi Jerry,
>
> Thanks for your quick reply,
> Am not trying to fool my users but what I want to do is to create
> something like the short URL maker so that you can get small URL from
> my website to use it with long ones at your own website, or to hide
> the real URL if its long with a small one, so my whole idea is a free
> service nothing more.
>

The TinyURL is a good idea. I use it when posting long url's here on
usenet. But it won't cloak the url of the real target page (which I
don't want to do, anyway).


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ Do, 24 Januar 2008 16:18 ] [ ID #1915624 ]

Re: How to make URL cloaking

Jerry Stuckle:

> The TinyURL is a good idea.

Not publishing excessively long URLs is better still.

--
Jock
John Dunlop [ Fr, 25 Januar 2008 21:21 ] [ ID #1916407 ]

Re: How to make URL cloaking

On Fri, 25 Jan 2008 21:21:06 +0100, John Dunlop <john [at] dunlop.name> wrote=
:

> Jerry Stuckle:
>
>> The TinyURL is a good idea.
>
> Not publishing excessively long URLs is better still.

However, pusblishing descriptive URLs is better then obscure ones:
http://www.example.com/mathematics/operators/laplace-transfo rm
vs.
http://www.example.com/?topicid=3D123abcfoo
-- =

Rik Wasmus
luiheidsgoeroe [ Sa, 26 Januar 2008 05:05 ] [ ID #1916923 ]

Re: How to make URL cloaking

Rik Wasmus:

> However, pusblishing descriptive URLs is better then obscure
> ones:http://www.example.com/mathematics/operators/laplace-tr ansform
> vs.http://www.example.com/?topicid=123abcfoo

Yes, there is indeed a balance to be struck between length and
descriptiveness. I suppose my remark was an "all else being equal"
one.

I say: designing URLs is a trade-off between principles such as
length, meaningfulnes, rememberability, typability and hackability;
persistence stands alone in that it should not be compromised.

By the way,

http://example.com/maths/operators/laplace-transform
http://example.com/math/ops/laplace-transform

--
Jock
John Dunlop [ Sa, 26 Januar 2008 09:05 ] [ ID #1916927 ]

Re: How to make URL cloaking

Dear topic starter,

If you are talking about redirect url - you'd better think about
<frames> ;)

http://cgartist.tk/ points to ...narod.ru
RomZ [ So, 27 Januar 2008 00:54 ] [ ID #1917321 ]

Re: How to make URL cloaking

On Jan 27, 1:54 am, RomZ <romz... [at] gmail.com> wrote:
> Dear topic starter,
>
> If you are talking about redirect url - you'd better think about
> <frames> ;)
>
> http://cgartist.tk/points to ...narod.ru

Thank you every body for your responses,

what i want to do is to create a short url to be used in order to call
long ones and hides the long url in the address bar, this is in order
to make some security on my system and to give the users an easy to
remember urls.

anyway am searching all your helpful topics and if theres any more you
want to share, will be really appreciated.

Thanks for all your answers

shror
shror [ So, 27 Januar 2008 10:29 ] [ ID #1917333 ]

Re: How to make URL cloaking

shror wrote:
> On Jan 27, 1:54 am, RomZ <romz... [at] gmail.com> wrote:
>> Dear topic starter,
>>
>> If you are talking about redirect url - you'd better think about
>> <frames> ;)
>>
>> http://cgartist.tk/points to ...narod.ru
>
> Thank you every body for your responses,
>
> what i want to do is to create a short url to be used in order to call
> long ones and hides the long url in the address bar, this is in order
> to make some security on my system and to give the users an easy to
> remember urls.
>
> anyway am searching all your helpful topics and if theres any more you
> want to share, will be really appreciated.
>
> Thanks for all your answers
>
> shror
>

IOW you want to make people think some other site's content is your own.

It won't work. As soon as they see a link on that page they'll find out
where it's coming from. The same with images or anything else similar.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ So, 27 Januar 2008 15:10 ] [ ID #1917337 ]

Re: How to make URL cloaking

RomZ wrote:
> Dear topic starter,
>
> If you are talking about redirect url - you'd better think about
> <frames> ;)
>
> http://cgartist.tk/ points to ...narod.ru


Or IFrames

j1mb0jay
MD Websunlimited [ So, 27 Januar 2008 20:19 ] [ ID #1917346 ]

Re: How to make URL cloaking

On Jan 27, 4:10 pm, Jerry Stuckle <jstuck... [at] attglobal.net> wrote:
> shror wrote:
> > On Jan 27, 1:54 am, RomZ <romz... [at] gmail.com> wrote:
> >> Dear topic starter,
>
> >> If you are talking about redirect url - you'd better think about
> >> <frames> ;)
>
> >>http://cgartist.tk/pointsto ...narod.ru
>
> > Thank you every body for your responses,
>
> > what i want to do is to create a short url to be used in order to call
> > long ones and hides the long url in the address bar, this is in order
> > to make some security on my system and to give the users an easy to
> > remember urls.
>
> > anyway am searching all your helpful topics and if theres any more you
> > want to share, will be really appreciated.
>
> > Thanks for all your answers
>
> > shror
>
> IOW you want to make people think some other site's content is your own.
>
> It won't work. As soon as they see a link on that page they'll find out
> where it's coming from. The same with images or anything else similar.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck... [at] attglobal.net
> ==================

Its not correct that I want to make people think other sites contents
are mine, what I want to do is two things,
1- to shorten my long URLs
2- to hide the hierarchy of my website with a different URLs

Anyway Thanks for all answers once more

shror
shror [ Mo, 28 Januar 2008 07:37 ] [ ID #1918256 ]

Re: How to make URL cloaking

shror wrote:
> On Jan 27, 4:10 pm, Jerry Stuckle <jstuck... [at] attglobal.net> wrote:
>> shror wrote:
>>> On Jan 27, 1:54 am, RomZ <romz... [at] gmail.com> wrote:
>>>> Dear topic starter,
>>>> If you are talking about redirect url - you'd better think about
>>>> <frames> ;)
>>>> http://cgartist.tk/pointsto ...narod.ru
>>> Thank you every body for your responses,
>>> what i want to do is to create a short url to be used in order to call
>>> long ones and hides the long url in the address bar, this is in order
>>> to make some security on my system and to give the users an easy to
>>> remember urls.
>>> anyway am searching all your helpful topics and if theres any more you
>>> want to share, will be really appreciated.
>>> Thanks for all your answers
>>> shror
>> IOW you want to make people think some other site's content is your own.
>>
>> It won't work. As soon as they see a link on that page they'll find out
>> where it's coming from. The same with images or anything else similar.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck... [at] attglobal.net
>> ==================
>
> Its not correct that I want to make people think other sites contents
> are mine, what I want to do is two things,
> 1- to shorten my long URLs
> 2- to hide the hierarchy of my website with a different URLs
>
> Anyway Thanks for all answers once more
>
> shror
>

OK, if you're just doing it for your site, you can use Apache's
mod_rewrite. More info in alt.apache.configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ Mo, 28 Januar 2008 13:24 ] [ ID #1918274 ]
PHP » comp.lang.php » How to make URL cloaking

Vorheriges Thema: include within include, using a relatve path
Nächstes Thema: Smarty Templates from Database