301 Jump Error

Source: Internet
Author: User
301 jump to the domain without www to the domain name with www

Appserv Server,
Write this code to the. htaccess file, the server will error
Rewriteengine Onrewritecond%{http_host} ^xxx.net [Nc]rewriterule ^ (. *) $ http://www.xxx.net/$1 [L,R=301]


To report this mistake,
500:
Internal Server Error

The server encountered an internal error or misconfiguration and is unable to complete your request.

What's the solution?


Reply to discussion (solution)

Rewriteengine Onrewritecond%{http_host} ^xxx\.net [Nc]rewriterule ^ (. *) $ http://www.xxx.net/$1 [L,R=301]

Rewriteengine Onrewritecond%{http_host} ^xxx\.net [Nc]rewriterule ^ (. *) $ http://www.xxx.net/$1 [L,R=301]



It's still the same with this. 500 error, same as previous error

Rewriterule ^ (. *) $ http://www.xxx.net/$1 [l,r=301]
Should write
Rewriterule ^ (. *) $ http://www.xxx.net/$1 [r=301,l]

Rewriterule ^ (. *) $ http://www.xxx.net/$1 [l,r=301]
Should write
Rewriterule ^ (. *) $ http://www.xxx.net/$1 [r=301,l]



It's a strange thing to report 500 mistakes.

Did you open a mod_rewrite?

sudo a2enmod rewrite

Did you open a mod_rewrite?


Okay, so this is not the opening, thank you.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.