Jump to content


Guests: Please register to get rid of these annoying ads! Registered members enjoy an ad-free forum.


Photo

Help with site redirection


19 replies to this topic

#1 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 11:36 am

Hey all -

I need some help from you guys. I'd like to do a redirect from the main directory to a subdirectory, e.g. www.mydomain.com > www.mydomain.com/subdirectory. Anyway I can do that with .htaccess or DA? I already tried both ways, but I can't seem to get it to work... perhaps I'm doing something wrong?

Thanks in advance!

#2 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 11:41 am

1) Do you currently have an .htaccess file? 2) If answer to 1 is yes then which directory is it currently in? 3) Can you copy/paste the .htaccess contents here?

#3 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:29 pm

I have an .htaccess file in the public_html folder. I took out the contents because it doesn't seem to be working but here's what it was:

Redirect / [url]http://www.mydomain.com/subdirectory[/url]


#4 DeviousTrap  OFFLINE  

DeviousTrap

    Ignore me, I'm a trap!

  • PipPipPipPipPipPipPip
  • 434 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:31 pm

I have an .htaccess file in the public_html folder. I took out the contents because it doesn't seem to be working but here's what it was:

Redirect / [url]http://www.mydomain.com/subdirectory[/url]


Did you see my response to your helpdesk ticket? I'm not a big fan of .htaccess redirections, my suggested method is:

http://www.tizag.com/htmlT/meta.php

<head>
<meta http-equiv="refresh" content="0; url="http://www.thenewurl.com/subdirectory"/>
</head>



#5 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:34 pm

Eric, I've used that method and it works. What's wrong with using .htaccess to redirect?

#6 DeviousTrap  OFFLINE  

DeviousTrap

    Ignore me, I'm a trap!

  • PipPipPipPipPipPipPip
  • 434 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:37 pm

Eric, I've used that method and it works.

What's wrong with using .htaccess to redirect?


Nothing is wrong with it, I just prefer using meta tags. Don't know why :indiffere

#7 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:42 pm

Yes, I saw it, and I just replied to you. :) While I can do an HTML redirect, I'm hoping .htaccess can do it for me. I want it to be as invisible to my visitors as possible, and the meta tag redirect is quite obvious. What's the site redirection feature for anyways if it can't do that? :confused:

#8 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:48 pm

This might be helpful http://www.computerb...g/about495.html

Search http://www.webhostin...m/search.php?s= for .htaccess you'll find a lot of threads.

#9 alm99  OFFLINE  

alm99

    Member

  • PipPipPipPipPipPipPip
  • 162 Posts
  • Member since 2004

Posted Jan 10, 2005 - 12:56 pm

I have tried the DirectAdmin redirect as well with no luck, but I am trying to go from mysite.com to forums.mysite.com

#10 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:11 pm

Ross -
I don't think the first link applies to me. 301 redirects are for multiple domains, I believe.

alm99 -
The site redirect should work for www.mysite.com > forums.mysite.com (note the www). I haven't figured out how it would work for mysite.com > forums.mysite.com.

#11 Scott  OFFLINE  

Scott

    Member

  • PipPipPipPipPipPipPipPipPip
  • 12,002 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:40 pm

I have tried the DirectAdmin redirect as well with no luck, but I am trying to go from mysite.com to forums.mysite.com


DA redirect is somewhat broken. I created a subdomain called webmail. Then I created a .htaccess file in that folder. I manually edited my .htaccess to look like...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail.domain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.webmail.domain.net$
RewriteRule ^(.*)$ http://www.domain.net/squirrelmail [R=301,L]

To have webmail.domain.net automatically go to squirrelmail.

#12 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:43 pm

Scott, How do you like DA so far?

#13 Scott  OFFLINE  

Scott

    Member

  • PipPipPipPipPipPipPipPipPip
  • 12,002 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:45 pm

Other than the redirect, I love it. That is the only problem that I had to figure out. I actually used my cPanel host to figure out how it was doing it. :) The important thing is that my clients like it much better.

#14 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:53 pm

I think it's got issues with subdirectories... subdomains seem to work fine for me. I'll get to the bottom of this yet...

#15 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 1:53 pm

Do any of your clients use the ClioMail skin?

I never did thank you for those super easy instructions, it worked perfectly!

#16 Scott  OFFLINE  

Scott

    Member

  • PipPipPipPipPipPipPipPipPip
  • 12,002 Posts
  • Member since 2004

Posted Jan 10, 2005 - 2:39 pm

Do any of your clients use the ClioMail skin?

I never did thank you for those super easy instructions, it worked perfectly!


I set ClioMail for people that don't want to deal with the web part of the site. I install a couple of easy scripts for them, and then give them ClioMail so that they can create/check email accounts. It is great.

#17 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 6:56 pm

I just tried the site redirect on FireFox, and it gave me this error (one I've never seen before): Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked.

#18 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 10, 2005 - 7:03 pm

Incidentally, I found a way to do it that's pretty fast (albeit still not transparent), and better IMO than HTML redirects: Create a file called index.php, drop it in your public_html folder, and c/p this code in: <?php header("Location: http://whereyouwant.com/to/go.html"); ?>

#19 RossMAN  OFFLINE  

RossMAN

    Senior Member

  • PipPipPipPipPipPipPipPipPip
  • 17,066 Posts
  • Member since 2004

Posted Jan 10, 2005 - 9:34 pm

But that's not using the .htaccess page!

#20 i-bystander  OFFLINE  

i-bystander

    still stuck in traffic...

  • PipPipPipPipPipPipPipPip
  • 3,169 Posts
  • Member since 2004

Posted Jan 11, 2005 - 8:20 am

I know! I'm still looking around for an .htaccess solution - the .php is just a quick and dirty alternative.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users