【问题标题】:how can i make this .htaccess handle https as well. it is now wel on http我怎样才能让这个 .htaccess 也处理 https。现在在 http 上很好
【发布时间】:2018-08-09 10:55:40
【问题描述】:

我怎样才能让这个继承的代码也处理 https 请求。我相信最小的调整可以做到,但我有限的 .htacess 阻止了我

AddDefaultCharset utf-8
Options +SymLinksIfOwnerMatch
Options -MultiViews
RewriteEngine on

RewriteBase /



RewriteRule ^tags-(.*)/ tags.php?keyword=$1
RewriteRule ^tags-(.*) tags.php?keyword=$1
RewriteRule ^profile-(.*)/ profile.php?username=$1
RewriteRule ^profile-(.*) profile.php?username=$1

RewriteRule ^jobagency-([^/]+)/?$ agency.php?channel=$1   [QSA,L]
RewriteRule ^jobagency-([^/]+)/([0-9]+)/?$ agency.php?channel=$1&page=$2

RewriteRule ^jobagency-([^/]+)/search/?$ agency.php?channel=$1&search=search   [QSA,L]
RewriteRule ^jobagency-([^/]+)/search/([0-9]+)/?$ agency.php?channel=$1&page=$2&search=search


RewriteRule ^jobagency-([^/]+)/category/?$ agency.php?channel=$1&category=   [QSA,L]
RewriteRule ^jobagency-([^/]+)/category/([^/]+)/?$ agency.php?channel=$1&category=$2


RewriteRule ^agency-(.*)/ index.php?channel=$1
RewriteRule ^agency-(.*) index.php?channel=$1

RewriteRule ^category-(.*)/ category.php?cat=$1 [QSA,L]
RewriteRule ^category-(.*) category.php?cat=$1 [QSA,L]
RewriteRule ^(\d+)-(.*)-([^-]+)\.html jobs.php?id=$3&fbpageid=$1

【问题讨论】:

    标签: apache .htaccess lamp


    【解决方案1】:

    但是您附加的代码根本与协议无关。也应该与 http 和 https 一起使用。

    【讨论】:

    • Klezper 它不起作用。与http配合得很好,如果我添加https,则在此服务器上找不到url。
    • 我发现它不起作用,因为?编码为 3f 。如果有人知道如何解决这个问题,仍在寻找解决方案。
    猜你喜欢
    • 1970-01-01
    • 2020-10-26
    • 2023-03-18
    • 2019-06-13
    • 1970-01-01
    • 2017-05-20
    • 2010-10-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多