0

Hi, I am getting an 500 internal server error when using the redirection code in my HTACCESS file.Given is the code i am using:

RewriteEngine On

rewritecond %{http_host} ^domain.com

rewriterule ^(.*)$ http://www.domain.com$1 [r=301,L]

I also have already following lines of code in my htaccess file:

# -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 domain.com
AuthUserFile /home/folder/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/folder/public_html/_vti_pvt/service.grp

Is it because of this code or there is any problem with the redirection code. Please help.......

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by whiteyoh
0

hi,

im a little confused by your question, but to redirect after a 301 error you should include the following

To redirect ALL files on your domain use this in your
.htaccess file if you are on a unix web server:

redirectMatch 301 ^(.*)$ http://www.domain.com
redirectMatch permanent ^(.*)$ http://www.domain.com

You can also use one of these in your .htaccess file:

redirect 301 /index.html http://www.domain.com/index.html
redirect permanent /index.html http://www.domain.com/index.html
redirectpermanent /index.html http://www.domain.com/index.html
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.