Redirect


#1

Hi guys I uploaded a sub folder with a site 50+ pages any-way I can redirect the folder soo if anyone goes to any of the pages they get redirected to my new website?

THANK YOU IN ADVANCE


#2

It depends on how complex you want the redirect to be. Are you saying you want any of the 50+ pages to redirect to the homepage of a new site, or are you saying that you have an alternative URL for each of the 50+ pages?

If the latter is the case (and there is the same folder hierarchy), some sort of mod_rewrite solution is probably the way to go. Otherwise, you may be able to accomplish the task with some simple redirects in your .htaccess file.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Are you saying you want any of the 50+ pages to redirect to the homepage of a new site, CORRECT.

Its a different addon domain on my dreamhost account.

So hows the best way to go about it?


#4

As I mentioned previously, use .htaccess. For example:

Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.htmlNot nightmarishly difficult, I think you’d agree.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

I’m new to this

Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html

What do I type into htaccess to achieve this?

mod_rewrite seems very hard.


#6

The example I gave you was not an example of mod_rewrite. It was just a simple redirect. Let me describe what is going on with this:

Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.htmlLet’s say your old webpage is at http://example.com/whatever/file.html, and you want to redirect that to http://different.com/ - you create an .htaccess file (just a text file that goes in your domain directory, saved with that name) that contains the following:

Redirect /whatever/file.html http://different.com/It really isn’t any more complicated than that.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#7
Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.website.com/$1 [R=permanent,L]

When I use that it works even If I type yahoo url, But when I put my own url which is hosted at dh It doesnt work.