Forum Moderators: phranque

Message Too Old, No Replies

301 redirect error

.htaccess file placed in a directory of a site

         

malasorte

10:37 am on Oct 10, 2005 (gmt 0)

10+ Year Member



Hello,

I'm moving my site from www.site-of-a-friend.org/my-site to www.widget.com.

I don't seem to get the 301 redirect to work. I place the .htaccess file in my sub-directory "my-site" but I get a 500 error. The .htaccess looks like this:

redirect 301 /my-site/ [widget.com...]

OK, I get a 500 error. If the redirect is this way:

redirect 301 /~my-site/ [widget.com...]

all works fine. But people who are coming to my site come to www.site-of-a-friend.org/my-site NOT www.site-of-a-friend.org/~my-site

So even though it works the redirect is ussles... What can I do?

Many thanks!

jd01

4:23 pm on Oct 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is the tilde ~ is encoded, I believe it is %7e, you might try that, or switch to RedirectMatch/Mod_Rewrite, which allow you to use 'catch all' regular expressions.

Justin

Tami_SEO

5:13 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Mine looks something like this:
(and google sitemaps don't give me any errors 200 header trouble with this method)

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName blahblahblah.com
AuthUserFile /www/htdocs/bbb.com/_vti_pvt/service.pwd
AuthGroupFile /www/htdocs/bbb.com/_vti_pvt/service.grp

AddType application/x-httpd-php .htm .html
ErrorDocument 404 http://www.bbb.com/404.html
redirect 301 /index.htm http://www.bbb.com/index.html
redirect 301 /blahblahblahpage.htm http://www.bbb.com
redirect 301 /blahblahblahpage.htm http://bbb.com
redirect 301 /blahblahblah.htm http://www.blahblahblah.com
redirect 301 /xproduct etc
etc...

[edited by: jdMorgan at 5:50 pm (utc) on Oct. 10, 2005]
[edit reason] De-linked [/edit]