Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HTTP 301 redirects

Featured Replies

Hi Everyone,

 

This is my first posting on this forum.

 

Several years ago, I built my first website and ran it on a BT server. It was in the days of dial-up and the package I subscribed to was Pay-As-You-Go. Since then, I now have my own domain, which is not hosted by BT. I would like to set up an HTTP 301 redirect to direct visitors from www.btinternet.com/~J.P.Coates to www.mirfieldinpictures.net. I tried setting up PHP, ASP and .htaccess redirects - all to no avail. I tried all these because I'm not sure what OS is used on the BT server. Nor do I know if it supports Apache. Hence, this e-mail. Can anyone advise me?

 

BTW, I've tried the obvious - contacting BT but all I got for my efforts was a bad headache!

 

I hope someone can help me.

 

Thanks,

 

JPC

  • Author

Hi Daemon Byte,

 

Thanks for the reply. Is using Javascript search-engine friendly?

 

JPC

as I understand it google won't reference javascript. All I can suggest is on the page with the javascript redirect put a html anchor link and the bot can follow that.

  • Author

I now know that I'm using Apache, although I don't know which version. Having scoured the net, it would appear that I need to create an httpd.conf or .htaccess file. When I tried previously, I was unable to upload a .htaccess file to the BT server. The basic syntax appears to be:

 

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

 

I notice that the above is sometimes included in <VirtualHost.............</VirtualHost>.

 

I need guidance.

 

JPC

The .htaccess file needs to be placed in the root directory of your old website

 

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

 

REPLACE domain.com and www.newdomain.com with your actual domain name.

  • Author

As my old website is www.btinternet.com/~J.P.Coates, I presume that I need to replace domain.com with btinternet.com/~J.P.Coates? I'll give this a try but the last time I tried uploading a .htaccess file, it wouldn't let me. So, I uploaded the file as htaccess.txt then renamed it to .htaccess but that wasn't acceptable either. I did remove the index.html file, which is the only html file uploaded to the BT server.

 

Thanks.

 

JPC

I have never used apache redirect on a shared hoster but I would assume it would have to be btinternet.com/~j.p..coates as the old domain. I would imagine that it's not allowed because bt is protecting their server from abuse. Hope you get it sorted.

  • Author

I'm having problems creating a .htaccess file and would welcome suggestions. I started out by creating a Notepad document - htaccess.txt. This document was then uploaded successfully to the BT server. Then I tried to rename it on the server to .htaccess but without success. I used FileZilla as the FTP client. Does anyone know why I can't rename it? Alternatively, is there another way of creating a .htaccess file?

 

JPC

I would imagine that bt is blocking you from renaming it. Most likely they are fearful somebody would abuse the .htaccess files for some malious purpose.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.