0

サーバーでホストしているいくつかの調査に、より良い URL を提供しようとしています。

だからここに私がしたことがあります。

  • サーバーの /var/www ディレクトリ (index.php ファイルが存在するのと同じ場所) に、ファイル .htaccess を作成しました。
  • 以下は、.htaccess ファイルの内容です。

    RewriteEngine On
    RewriteRule goodURL BadURL
    Redirect goodURL BadURL
    

goodURL (midnightsun.hiit.fi/socialnetworking) は存在しないものですが、BadURL (midnightsun.hiit.fi/limesurvey/index.php/755819) は存在するものです。

この URL リダイレクトを変更する理由は、適切な URL を提供するためです。

サーバー上の OS は Debian GNU/Linux 7.6 (wheezy) です。Apache2 です。

誰でもこれで私を助けることができますか?

4

1 に答える 1

0
Redirect temp /liliurl http://example.org/index.php/755819

<IfModule mod_rewrite.c>
    RewriteEngine on

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f

    # otherwise forward it to index.php
    RewriteRule . index.php
</IfModule>
# General setting to properly handle LimeSurvey paths
# AcceptPathInfo on
于 2014-10-18T09:30:14.950 に答える