質問

何が最善の方法を書き換えるもの以下"/some/subdir"を"/some/subdir/プロジェクト"のようなこと:

http://www.mydomain.com/some/subidr/test/

...この:

http://www.mydomain.com/some/subdir/projects/test/

を発見 類似の問題 掲載が、解決されているようには思えない働きました。現在の私の試みでるように見えません):

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_URI} !^/projects/.*$
RewriteRule ^(.*)$ /projects/$1 [L]

編集: されてしまったのでしょきます。htaccessファイルにおいては座内/some/subdirしていない書き込みアクセスのウェブサーバのです。

役に立ちましたか?

解決

このっとった作品:

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/some/subdir/projects/.*$
RewriteRule ^(.*)$ /some/subdir/projects/$1 [L]

他のヒント

うルールでおります。.htaccessファイルの設定ファイルのドキュメントルートのサーバー:

RewriteEngine on
RewriteRule !^some/subdir/projects(/|$) some/subdir/projects%{REQUEST_URI} [L]

として使用していきたいと考えているルール /some/subdir/ ディレクトリの変更は原則としており

RewriteRule !^projects(/|$) projects%{REQUEST_URI} [L]

する場合がございますのでおにリダイレクト等の /some/subdir/projects/foobar/some/subdir/foobar, は、この規則は前述:

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /some/subdir/projects[/?\s]
RewriteRule ^some/subdir/projects/?([^/].+)?$ /some/subdir/$1 [L,R=301]

私はこの:

RewriteEngine On
RewriteRule ^(/some/subdir)/(.*)$ $1/projects/$2

このリダイレクト /some/subdir/<anything>/some/subdir/projects/<anything>.

この / 実際に必要な試合の始まりURL ない限りRewriteBase / セットどこかということです。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top