redirect (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


d a v e -> redirect (4/7/2008 6:45:46)

i was searching on here and googling for an accessible and easy way of redirecting one site to another without being penalised by google and hopefully just in html or then if something else with some simple instructions / url of a good resource to do it.




Donkey -> RE: redirect (4/7/2008 10:34:52)

If the domain you are redirecting away from is on a linux server you can use .htaccess

Just create a plain text file in notepad and add the following all on one line:

Redirect permanent /index.html  http://www.newdomain.com/index.html


Substituting the correct addresses of course.

Then save the file as .htaccess and FTP it using ASCII not binary to the root folder of the domain you wish to redirect from.

That will divert the index page to the new index page, but you can add as many lines as you like if you want to divert individual pages.

Note that the first path that you are directing away from is always relative to the root folder, the one that you are directing to is always absolute.

As this is a permanent redirect you won't get penalised for using it.





treetopsranch -> RE: redirect (4/7/2008 11:25:03)

Can I use that on a FP web that is using extensions?




Tailslide -> RE: redirect (4/7/2008 11:36:48)


quote:

ORIGINAL: treetopsranch

Can I use that on a FP web that is using extensions?


Doing anything to the .htaccess file will corrupt your extensions far as I know.




coreybryant -> RE: redirect (4/7/2008 12:12:34)

Is the page already an ASP / .NET / PHP page? If so, you can user some code to state it is a 301 redirect




treetopsranch -> RE: redirect (4/7/2008 13:15:40)

Corey, I have been able to make some changes to an .htaccess file on a web that had FP extensions. But, you must really be careful to not change the order of the FP stuff located there.




d a v e -> RE: redirect (4/7/2008 15:08:47)

i guess it's a windows server but i'm not sure.

i tried several times in various but i can't get the thing to work! :(

i also found this page after posting here
http://www.stevenhargrove.com/redirect-web-pages/

one strange thing is that my index page seems to have to be .htm (not html)

if anyone wants to have a go i can pm the ftp details?!




coreybryant -> RE: redirect (4/7/2008 15:19:14)

No, sorry I was not suggesting to use htaccess. I was just wondering if the pages were ASP, .NET, or PHP.

I know there is server side code that can be put into a page to respond with a 301. ASP Tips - 301 Moved Permanently - Redirecting URLs with ASP shows an example with ASP, but it seems that might not help since the page(s) need to be htm




d a v e -> RE: redirect (4/7/2008 15:21:16)

no, they're not ASP, .NET, or PHP. ;)




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125