1

我有这个网站:http : //www.rolfgerard.com 和这个 htaccess:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^it/mostre.html exhibition.php [L]
RewriteRule ^it/rolf_gerard.html rolf_gerard.php [L]
RewriteRule ^it index.php [L]
RewriteRule ^de/ausstellungen.html de/exhibition.php [L]
RewriteRule ^de/rolf_gerard.html de/rolf_gerard.php [L]
RewriteRule ^de de/index.php [L]

当我进入网站的“IT”部分时,一切正常,当我进入“DE”部分时,我的 htaccess 不会将我重定向到正确的文件中,但它仍然是 index.php 文件。

我该如何解决?:(

完整的 .htaccess 文件:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

#RewriteRule ^([^/]+).html $1.php
#RewriteRule ^([^/]+)/([^/]+).html $2.php?lang=$1

# ITALIANO
RewriteRule ^it/thanks.html thanks.php [L]
RewriteRule ^it/credits.html credits.php [L]
RewriteRule ^it/privacy_policy.html privacy_policy.php [L]
RewriteRule ^it/link_media.html link_media.php [L]
RewriteRule ^it/visitaci.html contact.php [L]
RewriteRule ^it/contatto.html contact.php [L]
RewriteRule ^it/chi_siamo.html about.php [L]
RewriteRule ^it/pubblicazioni.html books.php [L]
RewriteRule ^it/opere.html works.php [L]
RewriteRule ^it/mostre.html exhibition.php [L]
RewriteRule ^it/rolf_gerard.html rolf_gerard.php [L]
RewriteRule ^it index.php [L]

# DEUTSCH
RewriteRule ^de/thanks.html de/thanks.php [L]
RewriteRule ^de/credits.html de/credits.php [L]
RewriteRule ^de/privacy_policy.html de/privacy_policy.php [L]
RewriteRule ^de/link_media.html de/link_media.php [L]
RewriteRule ^de/besuchen.html de/contact.php [L]
RewriteRule ^de/kontakt.html de/contact.php [L]
RewriteRule ^de/uber_uns.html de/about.php [L]
RewriteRule ^de/publikationen.html de/books.php [L]
RewriteRule ^de/works.html de/works.php [L]
RewriteRule ^de/ausstellungen.html /de/exhibition.php [L]
RewriteRule ^de/rolf_gerard.html de/rolf_gerard.php [L]
RewriteRule ^de de/index.php [L]

# ENGLISH
RewriteRule ^en/thanks.html en/thanks.php [L]
RewriteRule ^en/credits.html en/credits.php [L]
RewriteRule ^en/privacy_policy.html en/privacy_policy.php [L]
RewriteRule ^en/link_media.html en/link_media.php [L]
RewriteRule ^en/visit_us.html en/contact.php [L]
RewriteRule ^en/contact.html en/contact.php [L]
RewriteRule ^en/about_us.html en/about.php [L]
RewriteRule ^en/books.html en/books.php [L]
RewriteRule ^en/works.html en/works.php [L]
RewriteRule ^en/exhibitions.html en/exhibition.php [L]
RewriteRule ^en/rolf_gerard.html en/rolf_gerard.php [L]
RewriteRule ^en en/index.php [L]

# ONLINE SHOP
RewriteRule ^online_shop/index_de.html online_shop/index_de.php [L]
RewriteRule ^online_shop/index_en.html online_shop/index_en.php [L]

# PRESS
RewriteRule ^press/index_de.html press/index_de.php [L]
RewriteRule ^press/index_en.html press/index_en.php [L]
enter code here
4

1 回答 1

1

在 de 规则的开头添加“/”

RewriteRule ^de/ausstellungen.html /de/exhibition.php [L]
RewriteRule ^de/rolf_gerard.html /de/rolf_gerard.php [L]
RewriteRule ^de$ /de/index.php [L]

...
RewriteRule ^en$ en/index.php [L]
RewriteRule ^it$ index.php [L]
于 2012-05-30T14:45:30.527 回答