GetDotted Domains

Viewing Thread:
"301 redirects"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 16/02/11 at 13:12
Regular
Posts: 595
Hi,

I have seen two ways to establish a 301 redirect with htaccess.

Could you please tell me the operational difference between:

Redirect 301 / http://www.sitename.com

and

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.sitename.com [r=301,nc]

Thanks.

Neil
Sun 13/03/11 at 18:55
Regular
"a pint of plain..."
Posts: 103
FYI I finally got it working using php header statement. After all that I'm not sure it's what I want to do anyway! good to know how to do it for the future I suppose

here's what worked in case anyone's interested:

index.php containing ONLY the following:

header('Location: http://www.yoursite.com//index.php');
?>
Fri 11/03/11 at 23:34
Regular
"a pint of plain..."
Posts: 103
hi my htaccess file should be ok in general. I have already used it to enable php5 on the site

I am on standard hosting, although I thought this would not be an issue

I am going to try to do this from php instead, or failing that, I will just have to reorganise my folders

I am using filezilla to upload so no problem to remove a dodgy htaccess file but thanks for the warning!
Fri 11/03/11 at 16:43
Moderator
"Are you sure?"
Posts: 5,000
Need some more details really.

Are you happy with the format of your .htaccess file?

Are you on Standard or VIP hosting?

Where are you placing your .htaccess file? Perhaps try a test like mine going from folder>folder


EDIT
NB .htaccess is powerful stuff and can cause problems! So make sure your FTP client can remove the file if it all goes pear shaped ;¬)

[s]Hmmm...[/s]
Fri 11/03/11 at 16:24
Regular
"a pint of plain..."
Posts: 103
interesting:

Freeola error page:

"Error 500 running a script"
Fri 11/03/11 at 08:44
Moderator
"Are you sure?"
Posts: 5,000
Hi webcity1,
I've just tested this for you - from 1 subfolder to another as I don't want to wreck my live site ;¬)

www.hmmm.ip3.co.uk/find takes you to /search.


I'm using the second code example:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.hmmm.ip3.co.uk/search/ [r=301,nc]


Let me know how far you get or where it goes wrong.
[s]Hmmm...[/s]
Thu 10/03/11 at 19:40
Regular
"a pint of plain..."
Posts: 103
Has anyone successfully redirected from a htdocs to a sub-folder

for example

Redirect 301 / http://www.sitename.com/subfolder

to redirect from htdocs to subfolder

I can't seem to get it to work
Wed 16/02/11 at 13:50
Regular
Posts: 595
Thanks for that.

N.
Wed 16/02/11 at 13:44
Regular
"Embrace the Martian"
Posts: 285
On the surface they are two different ways for doing the same thing. At Apache level however they work quite differently, the Redirect directive is part of mod_alias, whilst the Rewrite directives use mod_rewrite.

mod_rewrite has much more advanced functionality which I will not go into now, but in this case both your RewriteRule and Redirect directives are triggering external 301 redirects.
Wed 16/02/11 at 13:12
Regular
Posts: 595
Hi,

I have seen two ways to establish a 301 redirect with htaccess.

Could you please tell me the operational difference between:

Redirect 301 / http://www.sitename.com

and

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$ http://www.sitename.com [r=301,nc]

Thanks.

Neil

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Excellent support service!
I have always found the support staff to provide an excellent service on every occasion I've called.
Ben
Best Provider
The best provider I know of, never a problem, recommend highly
Paul

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.