.htaccess错误,https传输上的循环重定向

时间:2018-09-17 17:51:30

标签: php .htaccess

我当前的.htaccess

  
    

使用PHP5 Single php.ini作为默认的AddHandler application / x-httpd-php5s .php RewriteEngine on Options -Indexes

  
> # $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
> #
> # This is used with Apache WebServers
> #
> # For this to work, you must include the parameter 'Options' to
> # the AllowOverride configuration
> #
> # Example:
> #
> # <Directory "/usr/local/apache/htdocs">
> #   AllowOverride Options
> # </Directory>
> #
> # 'All' with also work. (This configuration is in the
> # apache/conf/httpd.conf file)
> # The following makes adjustments to the SSL protocol for Internet
> # Explorer browsers
> # <IfModule mod_setenvif.c>    #      <IfDefine SSL>
>       #    SetEnvIf User-Agent ".*MSIE.*" \
>       #             nokeepalive ssl-unclean-shutdown \
>       #             downgrade-1.0 force-response-1.0
>       #      </IfDefine>    # </IfModule>
> # If Search Engine Friendly URLs do not work, try enabling the
> # following Apache configuration parameter
> # AcceptPathInfo On
> # Fix certain PHP values
> # (commented out by default to prevent errors occuring on certain
> # servers)
> # php_value session.use_trans_sid 0
> # php_value register_globals 1
> # For security reasons, Option followsymlinks cannot be overridden.
> #Options +FollowSymLinks Options +SymLinksIfOwnerMatch RewriteBase / RewriteRule ^(.*)-p-(.*).html$
> product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
> RewriteRule ^(.*)-pi-([0-9]+).html$
> popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
> RewriteRule ^(.*)-a-([0-9]+).html$
> article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-pr-([0-9]+).html$
> product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-pri-([0-9]+).html$
> product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule
> ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
> # File modified on Tue Apr 12 09:18:52 2011 by server
> # For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
> # php_value auto_append_file /home2/syntecon/public_html/Thumbs.db AuthName "Public_Html"
     

AuthUserFile

     
    

“ / home2 / syntecon / .htpasswds / public_html / passwd”

  

当我尝试添加https redirect时:使用

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

rewriteCond %{HTTPS} !on
rewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

或者其他方法,我一直在得到。

  

重定向您太​​多次。

需要帮助您重定向网站的每个页面。

谢谢

0 个答案:

没有答案