We help IT Professionals succeed at work.

help with 301 redirect

elliottbenzle used Ask the Experts™
I am trying to redirect my old site to my new site. I've added a .htaccess file but nothing seems to be happening.

My .htaccess file is here: http://mainstpackaging.com/.htaccess

I want to redirect from    http://mainstpackaging.com/      to     http://mainst-group.com/

any ideas what I'm doing wrong?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try this . Its a simple javascript redirect

on your old site rename the index file and create a index.html

add this to the new index.html
<SCRIPT language="JavaScript">

see more at the url below

Jason C. LevineDon't talk to me.
>> access file is here: http://mainstpackaging.com/.htaccess

You may not have the .htaccess set up correctly.  I shouldn't be able to see it from a browser.  If I can, it may mean that the server is treating it as content instead of following the instructions in the file.
true ensure that you have a propper file extension on your file . are you sure you server supports htaccess files?
LinuxGuruLinux Server Administrator

There seems to some problem with your webserver. Make sure that your webserver support .htaccess. Also I can view .htaccess file in browser http://mainstpackaging.com/.htaccess . The server does not seem to be accepting the .htaccess rules. (Normally its not possible to access .htaccess files through browser)

You can refer the code mentioned in the following question for 301 redirect.



Thanks, everyone was right. It seemed to be a problem with .htaccess.