Jul 24, 2008

How To Redirect From One Page To Another? - type a url but it directs to another url

Free Web Hosting, No Ads > General > Hosted Members Area

free web hosting

How To Redirect From One Page To Another? - type a url but it directs to another url

vietonline
I want to do something like this.
I have open a forum, and my forum at this address www.domain.com/forum/ ,but I want my member type only www.domain.com then it will direct them to this address www.domain.com/forum/
anyone know how to do it,can you help me with this?

Reply

BuffaloHELP
Make index.php file with code:

CODE
<?php
header ("Location: http://www.domain.com/forums");
?>


or make index.html (or index.htm) with code:

HTML
<meta http-equiv="refresh" content="2;url=http://www.domain.com/forums">


where 2 denotes the time in seconds before it directs. Nice if you want to show a message "you're being redirected to another page in X seconds"

Reply

lemonwonder
or go into cpanel,

and then scroll down to web tools (I think tis web tools) and then click manage redirects,

Reply

Paul
You can use .htaccess to achieve this while pleasing the Search Engines as well.

Create a file (if it doesnt already exist) called .htaccess and add the following code to the .htaccess file and then place the .htaccess file in your public_html folder.
CODE

Options +FollowSymlinks
RewriteEngine on
rewriterule ^www.domain.com$ [url=http://www.domain.com/forum]http://www.domain.com/forum[/url] [r=301,nc]
rewriterule ^domain.com$ [url=http://www.domain.com/forum]http://www.domain.com/forum[/url] [r=301,nc]


What this does this that it redirects www.domain.com to www.domain.com/forum and tells the Search Engines that the homepage has permanently moved to the new page (forums).

Please REPLACE domain.com and with your actual domain name.

Note: This method of using .htaccess only works on Apache servers with mod_rewrite enabled (If you use Trap17 you will be fine!)

 

 

 


Reply

delivi
Automatic Redirection using HTML Tag

CODE
Put this code inbetween the <head> and </head> tags.
<META HTTP-EQUIV="Refresh" CONTENT="n;URL=http://your_url">
Where 'n' is the number of seconds to wait before redirection. Set it to '0' if you dont want to wait.

Put the url where you want to be redirected by replacing the 'your_url'


Redirection Using JavaScript

CODE
Put this code any where between the <head> and </head> tags.

<script LANGUAGE="JavaScript"><!--
    window.location.href = "your_url"; -->
</SCRIPT>

Put the url where you want to be redirected by replacing the 'your_url'




Reply

lemonwonder
Or possibly like i sed, the simplest and easiest, leastr time consuming way, and its easy to keep track on is using Managte Redirects!

Reply

vietonline
QUOTE(Paul @ Aug 12 2006, 07:55 AM) *

You can use .htaccess to achieve this while pleasing the Search Engines as well.

Create a file (if it doesnt already exist) called .htaccess and add the following code to the .htaccess file and then place the .htaccess file in your public_html folder.
CODE

Options +FollowSymlinks
RewriteEngine on
rewriterule ^www.domain.com$ [url=http://www.domain.com/forum]http://www.domain.com/forum[/url] [r=301,nc]
rewriterule ^domain.com$ [url=http://www.domain.com/forum]http://www.domain.com/forum[/url] [r=301,nc]


What this does this that it redirects www.domain.com to www.domain.com/forum and tells the Search Engines that the homepage has permanently moved to the new page (forums).

Please REPLACE domain.com and with your actual domain name.

Note: This method of using .htaccess only works on Apache servers with mod_rewrite enabled (If you use Trap17 you will be fine!)


I did it ,but it didn't work.I already change the domain name with my actual domain name.But I like this code to much can you please figure out why it doesn't work. thanks

Reply

farsiscript
Hi dear vietonline at first login at cpanel
then click at Manage Redirects and then
leave textbox one and type in textbox two your forum address and then click at add




or you can find many javascript code for redirect :

CODE
<html>
<script>
    location = "http://www.i-code.co.uk/index.php";
</script>
</html>

or use php redirect code :
CODE
<?php
$forum = "Your Forum address " // like [url=http://yourdomain.com/forum]http://yourdomain.com/forum[/url]
header ("Location: $forum");
?>

Reply

vietonline
To farsiscript:

Thank you so much,this is the way that I want to do,and with the way you show me ,it is so easy to do.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : redirect url directs url

  1. Redirect Problem? [resolved] - (9)
  2. Domain Name Redirect - (7)
    I've setup the my account with a domain name with start of this month and from that time and
    it's working normally, but the problem starts when I have add an addon domain last 4 days ...
    the addon domain works fine but the oiginal domain name somtimes it shows me pages that were on
    previous server... I've checked the Nameservers .. pointed to Trap17 servers .. I wondered...
  3. Help : Www Redirect - (3)
    I want the website url to be always http://www.laschatz.info/ . even if the visitor types
    http://laschatz.info/ it should be automatically redirected to http://www.laschatz.info/ I found
    that this works in trap17.com too. If I type http://trap17.com , it automatically gets changed to
    http://www.trap17.com/ Please help me how to do this....
  4. Mods/admins Big Problems With Accessing The Forums Here! [resolved] - sme silly JS redirect all the time (7)
    Hi there Im having a nasty issue with accesing the forums when javscript is enabled in my browser,
    both in IE6 and the latest FF, at the moment JS is off which is why im able to post this. Basically
    when i access the forums the forums shw for a split secnd and then are replaced by a blank page with
    a link saying "Click to show/hide »" with the url f that link being whatever page i wass trying to
    get, with a hash, eg trap17.com/forums/# and if i click that link it just repeats with the forums
    than this blank page. Any ideas what it is? I dont see how it could be my sid...
  5. Can I Redirect A Forum To My Url? - (4)
    I want to ask , for example i have my domain hosted on trap17.The adress will be , www.mydomain.com
    , and then i get a form hosted on anyother site, and it has its own url...can i redirect that form
    to my domain such that it looks like forum.mydmain.com ? or mydomain.com/forum , etc? In simple
    words i want to use the third party hosted free forum but i want to use my url..not their..Is is
    allowed generally??...
  6. Invisible Redirect Help - addon domain redirect invisibly (1)
    Ok so I bought a domain name from yahoo and set it up. I added the trap17 name servers on it and
    added it as an addon domain in my trap17 cpanel. I have the addon domain redirect set to redirect
    it correctly, but it changes to my atomicnacho.trap17.com/mynewdomain-com/ URL in the address bar.
    I would like it to stay as www.mynewdomain.com. The redirect works fine, but the URL changes in the
    address bar. I need to make sure that the new domain points to a folder under my main public_html,
    so I thought I needed to set it up as an addon domain. I've searched around...
  7. 301 Redirect - (1)
    Hi: I hope somebody is able to help me with this one. I use to have my site on a different server.
    It was also free. But they had advertisements and I wasn't able to use my own domain name. So
    I moved my site to Trap 17. The problem is, I got traffic to the old site, and have good search
    engine rankings with the old URL. How do I do a 301 redirect? Does anybody have a tutorial they
    could point me to? Also, part of the problem, the other host did not offer many advanced features
    as trap 17. So I don't even know if a 301 redirect will be possible. Than...
  8. My Site Isn't Showing Up - I bought it to redirect.. (3)
    On April 2nd, I bought thyelite.com and set it to redirect to thyelite.trap17.com with the dns
    servers ns1.trap17.com and ns2.trap17.com. It's now the sixth and it isn't showing up.
    I've heard that it takes like two days, but it's been four. I've check to make sure I
    didn't make a typo, and I'm ready to call Godaddy.com and ask them what's up if none of
    you know what I may have done wrong....
  9. Redirect Manager Help - cant seem to make it work (15)
    /ph34r.gif" style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" />
    originally, I only had to add one redirect path and it worked fine for quite awhile... but
    recently, all of the sudden, its not redirecting to the page I want it to... On top of that, when I
    go into redirect manager to actually delete the old path and add a new redirect path, it wont let
    me... its really weird... if anybody could help me with that!!! thanks!!!...



Looking for redirect, page, type, url, directs, url

Searching Video's for redirect, page, type, url, directs, url
advertisement



How To Redirect From One Page To Another? - type a url but it directs to another url



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE