2016-05-16 17 views
0

1).htaccessのmod_rewriteのサブディレクトリと同じ名前

私は書き換え/ニュース//ニュースへ/ニュースリーダー/をしようとしています。

私はこの1つを試してみた:

RewriteRule ^news/(.*)$ news/news-reader/$1 [R=301,L] 

はreaultingのURLが何であるかを推測?

ニュースリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダーリーダー

再書き込みエラーが発生しました。

「ニュース」の部分を正しい方法でURLに書き直すにはどうすればよいですか?

2)

どのように私は、 "ニュース" に "ニュース/" を書き換えることができます。だから、スラッシュなしでURLに行くのだろうか?

答えて

0

ルート.htaccessファイルに次のコードを置き:申し訳ありませんが、これは動作しません

RewriteEngine on 

RewriteCond %{REQUEST_URI} !^/de/news/news-reader/ 

# the line above will prevent looping witch was happened in your code 

RewriteRule ^de/news/(.*)  /de/news/news-reader/$1 [L,R=301] 

# the line above will redirect /de/news/page to /de/news/news-reader/page 
# so at your code you missed to put/before target url 
+0

。リダイレクションなしのエラーはありません。 – mpitz

+0

このコードはどこにありますか?どのディレクトリですか?これに http://www.domain.de/de/news/something : ます。http://www.domainをルートの.htaccessファイル に –

+0

は、私はこれを書き換えたい 明確にすること。 de/de/news/news-reader/something – mpitz

関連する問題