0

これらのapache2の書き換えについて混乱しています。

もちろん、実際のURLを使用するRESTインターフェースを作成する必要があります。ローカルホストのATMでテストしています。

http://localhost/ssase12/services/users/
http://localhost/ssase12/services/users

に送信する必要があります

http://localhost/index.php?rt=index/users

したがって、3。フォルダー/名前を検出し、上記のリンクにリダイレクトする必要があります-users =$1。

意味をなす?ユーザーフォルダーに配置された.htaccessを使用してこれを実行しようとしています...サービスフォルダーからこれを実行できますか?だから、後に書かれたすべて

http://localhost/ssase12/services/blah(/) 

同様に送信されますか?

ありがとう

4

1 に答える 1

0

ルールはドキュメントルートのいずれかに置くことができます

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ssase12/services/(.*?)/?$ /index.php?rt=index/$1 [L]

または ssase12 ディレクトリ:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^services/(.*?)/?$ /index.php?rt=index/$1 [L]

またはサービスディレクトリ。

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?)/?$ /index.php?rt=index/$1 [L]
于 2012-11-27T11:25:00.680 に答える