Web Hosting Talk







View Full Version : How to create redirect URL


xisnet
10-30-2006, 09:56 PM
Hi,

I want to create easy to remember URL then will redirect it to the long name URL, let say the original URL is www.mydomain.com/index.php?aplikasi=Katalog_v2&status=1&id=234 , so I want to use easy to remember URL like this www.mydomain.com/Katalog to redirect to the original URL above. I had try using Cpanel redirect function but it doesn't work. Can anyone help me on this.

TQ
--
Jai

horizon
10-30-2006, 11:27 PM
Supposing you're using PHP for redirection process, you can always the header module. ;)

With HTML, it would be with meta.

Googled
10-31-2006, 01:19 AM
I'd recommend using .htaccess files to do such work.

However, there's plenty of methods available: http://www.webconfs.com/how-to-redirect-a-webpage.php

Regards,

G

truz
10-31-2006, 02:15 AM
whatever url you want redirected, just place this in the file.

<SCRIPT TYPE="text/javascript">
document.location.href = "http://**URLHERE**";
</SCRIPT>

another example...

<html>
<head>
<title>**TITLE**</title>
</head>
<body>
<SCRIPT TYPE="text/javascript">
document.location.href = "http://**URLHERE**";
</SCRIPT>
</body></html>

xisnet
10-31-2006, 04:04 AM
Actually the URL www.mydomain.com/katalog just the name and there is no folder or file name katalog but I want to create an easy to remember URL for the long URL http://www.mydomain.com/index.php?aplikasi=Katalog_v2&status=1&id=234 . So visitor only need to know www.mydomain.com/katalog instead the long URL. If you said using PHP or HTML which file I need to put that code because 'katalog' is not a folder or file. It just a name.

Thank You,
--
Jai

maxymizer
10-31-2006, 04:18 AM
Search this forum for mod_rewrite and search engine friendly URLs, it's been answered many times now.

Supposing you're using PHP for redirection process, you can always the header module.

What's header module? header function does exist. Time to learn the terms already don't you think?

xisnet
10-31-2006, 04:21 AM
Thanks everyone, I found the solutions using mod_rewrite.

TQ
--
Jai

thunder-ltu
10-31-2006, 05:45 AM
You can use also .htaccess file for this problem, if you are running Apache of course. :)

xisnet
10-31-2006, 07:33 AM
Yes, I just add several line of configuration in .htaccess file.

Thank You,
--
Jai

ClearifyHosting
10-31-2006, 04:16 PM
Search this forum for mod_rewrite and search engine friendly URLs, it's been answered many times now.



What's header module? header function does exist. Time to learn the terms already don't you think?

If you wanted a "redirect" function in php - it would probably look like this,

header ('Location: http://sitehere.com');

That would be the "header function/module" you would be talking about.

Edit: Oops, I reread your post and realised that you were correcting another person. Sorry. ;)