Apache under Htaccess file does not work/rewrite no effect

Source: Internet
Author: User
"Apache under rewrite unsuccessful"


Did not successfully follow the following three steps:


"First step: Open rewrite Module No"


First we find the/CONF/HTTP.CNF in the Apache installation directory.
Open, File Search rewrite find
#LoadModule Rewrite_module modules/mod_rewrite.so


Remove the front # instead
LoadModule Rewrite_module modules/mod_rewrite.so






"Step two: Open file allow overload not"


Continue searching the file for '. htaccess ' We found the following annotation corresponding to the
AllowOverride None


    #
    # AllowOverride Controls What directives may is placed in. htaccess files.
    # It can be ' all ', ' None ', or any combination of the keywords:
    #   Options FileInfo authconfig Limit
    #
    Allow Override None




Then we will
AllowOverride None


To
AllowOverride All




Note the location of the change because the file has multiple "allowoverride None"
It only works if we find the right place.


"Step three: Check the previous two steps"


Restart Apache


"NOTE: If you cannot save a file under Windows. htaccess"


① solution open File using EditPlus and click Save As Copy
Write the filename. htaccess can be


② Solution found http.conf file
At the end add:
Accessfilename. htaccess  


Restart Apache


Then change the file name directly to Htaccess


Last

If it still doesn't work, please check your rewrite syntax.







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.