3

wordpress admin からパーマリンクをクリックすると、ルート フォルダーに .htaccess ファイルが自動的に作成され、wordpress サイトがブラウザー エラーサーバー エラー 500で動作しなくなります。 ini が表示されます。

httpd.conf 設定

<Directory "E:/xampp/cgi-bin">
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

<Directory "E:/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options All

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

HTACCESS ファイル コード

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

4 に答える 4

0

私はこの問題を解決するのに苦労しましたが、私が見つけた主なものは、htaccess URL 書き換えシーンをサポートしていないローカル サーバーでした。そのため、同じコードを ftp アカウントにアップロードし、オンラインで問題を解決しました。

xampp サーバーで URL 書き換えモジュールのコメントを外したのに、ローカル環境でまだ動作しないにもかかわらず、ローカル サーバーで URL 書き換えを許可できるかどうか疑問に思います。

于 2014-05-03T05:43:04.643 に答える