0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PowerCMS会員専用ページ

Last updated at Posted at 2024-04-16

PowerCMSの会員専用ページで mt-member.cgi を別のフォルダにアクセスさせる。
例:/cgi-bin/ 配下に置く

  • PowerCMS 6.1
  • Members 1.98

mt-config.cgi の修正

mt-config.cgi
MemberScript members.cgi
MemberCGIPath /cgi-bin/

PDFもアクセス制限かける

DynamicMTML .htaccess
<FilesMatch (^(|[^.]+)|\.[Pp][Dd][Ff]?)$>
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^ <$mt:BlogRelativeURL$><$mt:DynamicSiteBootstrapper$> [L]
</IfModule>
<IfModule !mod_rewrite.c>
  <IfVersion >= 2.3>
    Require all denied
  </IfVersion>
  <IfVersion < 2.3>
    Order Allow,Deny
    Deny from all
  </IfVersion>
  ErrorDocument 403 <$mt:BlogRelativeURL$><$mt:DynamicSiteBootstrapper$>
</IfModule>
</FilesMatch>

.mtview.php のリダイレクト先の設定

mt-members.cgiを読み込むようになっている設定をコメントアウト

/path/to/mt/plugins/Members/php/config.php
        #'config_settings' => array(
        #    'MemberScript' => array( 'default' => 'mt-members.cgi' ), # DEPRECATED
        #    'MembersScript' => array( 'default' => 'mt-members.cgi' ),
        #),

CGIPathを読んでいるので mt-config.cgi で設定した MemberCGIPath を読むように修正

/path/to/mt/plugins/Members/php/config.php
                    //$login_url = $app->config( 'CGIPath' );
                    $login_url = $app->config('MemberCGIPath');
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?