如何在php中为子域修复htaccess

时间:2019-07-06 14:05:58

标签: php .htaccess subdomain

我更改了服务器,但是在新服务器上,我希望代码位于我创建的子域中,但是我一直收到错误消息 403 禁止。

我尝试清除cookie和缓存,并确保所有数据库信息正确。

    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php72” package as the default “PHP” programming language.
    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L,NC]
    <IfModule mime_module>
      AddType application/x-httpd-ea-php71 .php .php7 .phtml
    </IfModule>

    <IfModule php7_module>
       php_flag display_errors Off
       php_value max_execution_time 300
       php_value max_input_time 300
       php_value max_input_vars 1000
       php_value memory_limit -1
       php_value post_max_size 128M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/home/tmp/"
       php_value upload_max_filesize 128M
       php_flag zlib.output_compression Off
    </IfModule>
    <IfModule lsapi_module>
       php_flag display_errors Off
       php_value max_execution_time 300
       php_value max_input_time 300
       php_value max_input_vars 1000
       php_value memory_limit -1
       php_value post_max_size 128M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/home/tmp/"
       php_value upload_max_filesize 128M
       php_flag zlib.output_compression Off
    </IfModule>
    # END cPanel-generated php ini directives, do not edit

我不断收到错误403,禁止访问服务器上的该资源!

0 个答案:

没有答案