Internal Server Error - htaccess

前端 未结 6 1930
再見小時候
再見小時候 2020-12-07 15:35

I have a htaccess file that it work perfectly on host but when I put it on local ,it shows me this error:

Internal Server Error

The server

相关标签:
6条回答
  • 2020-12-07 16:00

    On your command line:

    Install mod_headers

    sudo a2enmod headers
    

    and then restart apache

    service apache2 restart
    
    0 讨论(0)
  • 2020-12-07 16:01

    Try this:

    <IfModule mod_headers.c> Header set [your_options] </IfModule>
    

    Have you restarted WAMP after installing / enabling?

    0 讨论(0)
  • 2020-12-07 16:07

    the Header directive is in the mod_headers apache module. You need to make sure that module is loaded into the apache server.

    0 讨论(0)
  • 2020-12-07 16:08

    This answer works for me

    <IfModule mod_headers.c> Header set [your_options] </IfModule>
    
    0 讨论(0)
  • 2020-12-07 16:10

    Steps to enable HEADERS modules

    $ cd /etc/apache2/mods-available
    $ sudo a2enmod headers
    $ /etc/init.d/apache2 restart
    
    0 讨论(0)
  • 2020-12-07 16:11

    In an Ubuntu/Debian Machine you can simply run this command:

    sudo ln -s /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/
    

    and should be all set.....

    0 讨论(0)
提交回复
热议问题