It is currently Thu Mar 28, 2024 9:36 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: no redirect?
PostPosted: Sun Mar 06, 2005 10:21 pm 
Noobie
Noobie

Joined: Sat Mar 05, 2005 2:41 pm
Posts: 6
hi there

i'm not able to use redirects:i get no error,but the redirect is not...happening
what's wrong?

thanks


Top
 Profile  
 
 Post subject: Re: no redirect?
PostPosted: Sun Mar 06, 2005 10:50 pm 
Experienced
Experienced

Joined: Fri Feb 18, 2005 4:41 pm
Posts: 54
sefu wrote:
hi there

i'm not able to use redirects:i get no error,but the redirect is not...happening
what's wrong?

thanks


I am redirecting fine, how are you doing it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 11:12 am 
Noobie
Noobie

Joined: Sat Mar 05, 2005 2:41 pm
Posts: 6
header('Location:file_name');


Top
 Profile  
 
 Post subject: Redirecting using .httaccess
PostPosted: Sat Aug 11, 2007 5:25 pm 
Noobie
Noobie

Joined: Tue Nov 07, 2006 7:30 pm
Posts: 7
Hi,

I have recently switched most of my pages from .html to .php. I would like to redirect visitors who land on the old pages to the new ones. Unfortunately, using the php redirect function is not possible here. Also, I would like to avoid using HTML and Javascript redirects as search engines do not like them and might end up seeing the pages as spam.

It seems that .htaccess is the best route to go, I created an .htaccess file and added a directive similar to this one:

redirect 301 /old/old.htm http://www.you.com/new.htm

Unfortunately, it did not do the redirection.

Are redirect directives allowed? Is there another "safe" way to redirect my pages.

Thank you.

_________________
Canada Restaurants Guide

Montreal Photos Blog


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 11, 2007 10:57 pm 
Support Team Member

Joined: Sat Feb 12, 2005 5:19 pm
Posts: 289
Yes, the redirect is possible to be made via .htaccess file. But could you open a trouble ticket regarding this issue. Then we will be able to assist you. You can open it via the Help Center section of your Control Panel.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 12, 2007 4:59 pm 
Noobie
Noobie

Joined: Tue Nov 07, 2006 7:30 pm
Posts: 7
After many trials and errors, it finally worked (almost by chance). I am sharing the information here.

Say that your web site address is http://mydomain.com, that you have a directory called mydirectory and a file called myfile.htm. Suppose that you have renamed your file into myfile.php and than you want to redirect all the traffic intended for http://mydomain.com/myfile.html to http://mydomain.com/mydirectory/myfile.php

First, I tried these directives and none of them worked:

Redirect 301 /mydomain.com/mydirectory/myfile.html http://mydomain.com/mydirectory/myfile.php

and

Redirect 301 /www/mydomain.com/mydirectory/myfile.html http://mydomain.com/mydirectory/myfile.php

Then, I started playing a bit with the params, trying to supply non-existing files and directories, to see how will the server behave (some sort of functional analysis as I did not really want to go through lengthy Apache tutorial pages). I finally typed in something like this and it worked like a charm:

Redirect 301 /mydirectory/myfile.html http://mydomain.com/mydirectory/myfile.php

It was as simple as that and I am really glad that it works.

Also, thanks to the support team for their fast replies.

_________________
Canada Restaurants Guide

Montreal Photos Blog


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011