0

これらの2つの.htaccessファイルをマージするにはどうすればよいでしょうか。500エラーをトリガーし続けます。

  • 各バージョンは、それ自体で美しく機能します。
  • Amember .htaccess(1st)は、最初に実装する必要があると私が信じているアクセスを保護します。
  • クリーンURLにはWordpress.htaccess(2nd)が必要です。

htaccess 1)

########### AMEMBER START #####################
Options +FollowSymLinks
RewriteEngine On

## allow access for product #12        
RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
RewriteCond /home/www/changed.tld/amember/data/new_rewrite/%1-12 -f 
RewriteRule ^(.*)$ - [L]

## if user is not authorized, redirect to login page
# BrowserMatch "MSIE" force-no-vary
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ http://changed.tld/amember/plugins/protect/new_rewrite/login.php?v=-12&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R]
RewriteRule ^(.*)$ http://changed.tld/amember/plugins/protect/new_rewrite/login.php?v=-12&url=%{REQUEST_URI} [L,R]
########### AMEMBER FINISH ####################

htaccess 2)

# BEGIN WordPress
<IfModule mod_rewrite.c>
#RewriteEngine On
RewriteBase /localsearch/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /localsearch/index.php [L]
</IfModule>
# END WordPress

AddType application/octet-stream .pdf
4

1 に答える 1

1

私の考えは後ろ向きでした。トリックは、最初にwpリンクを「書き換え」てから、次にamembersecure.htaccessを実行することでした。以下は私のために働いたものです。特に、WPリライトの最後の行に[L]がないことに注意してください。

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /localsearch/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /localsearch/index.php 
</IfModule>

# END WordPress

########### AMEMBER START #####################
Options +FollowSymLinks
RewriteEngine On

## allow access for product #12        
RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
RewriteCond /home/www/changed.tld/amember/data/new_rewrite/%1-12 -f 
RewriteRule ^(.*)$ - [L]

## if user is not authorized, redirect to login page
# BrowserMatch "MSIE" force-no-vary
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ http://changed.tld/amember/plugins/protect/new_rewrite/login.php?v=-12&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R]
RewriteRule ^(.*)$ http://changed.tld/amember/plugins/protect/new_rewrite/login.php?v=-12&url=%{REQUEST_URI} [L,R]
########### AMEMBER FINISH ####################
于 2011-08-11T10:47:55.347 に答える