PDA

View Full Version : 301 redirect help


JBD
08-08-2011, 05:28 PM
I need to redirect some of my old pages to new ones (with different urls) only I'm having trouble trying to create a .htaccess file. I use a mac and understand that macs automatically hide a "." file when created.

I'm just wondering if anyone has advice on how to create 301 redirects on a mac? My host is 1and1 - I've tried searching the control panel but they do not seem to provide a 301 redirect feature.

Help much appreciated!

DWcourse
08-08-2011, 05:36 PM
you can just name the file htaccess on your mac and add the period after uploading

JBD
08-08-2011, 05:41 PM
Perfect! Such a simple solution :) Many thanks!

JBD
08-08-2011, 06:41 PM
Another question regarding redirects...

Should I direct for instance:

http://mydomain.com
http://www.mydomain.com
http://mydomain.com/index
http://www.mydomain.com/index
http://mydomain.com/index.html
http://www.mydomain.com/index.html

all of these variants (and any others) all to one url?

domedia
08-08-2011, 08:18 PM
not all.

/index is a directory name.

It should first happen on the subdomain level (with or without 'www'), then you can redirect default directory index page (index.html). But for pages you don;t have, create a cool 404 page.

JBD
08-08-2011, 08:46 PM
I'm not sure I understand what to do with the index.html file. I notice if I try http://www.dreamweaverclub.com/index.html I get a 404 page. I thought the index file is the file used for the subdomain? Should I be redirecting my index file?