RewriteRule不适用于语言(404)

时间:2013-10-31 09:58:40

标签: wordpress .htaccess mod-rewrite qtranslate

我正在寻找解决方案两天后找不到解决方案! 我只添加两个来显示问题,因为我总是得到404 ... 如果有人可以帮我解决这个问题,那将会很棒。

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteRule ^seefracht-spedition\.htm http://www.sats-logistics.com/seefracht-spedition/ [R=301,L,NC]
RewriteRule ^luftfracht-spedition\.htm http://www.sats-logistics.com/luftfracht-spedition/ [R=301,L,NC]
RewriteRule ^service-zollabwicklung\.htm http://www.sats-logistics.com/service-zollabwicklung/ [R=301,L,NC]
RewriteRule ^lager-logistik\.htm http://www.sats-logistics.com/lager-logistik/ [R=301,L,NC]
RewriteRule ^service-hafenabwicklung\.htm http://www.sats-logistics.com/service-hafenabwicklung/ [R=301,L,NC]
RewriteRule ^umzug-spedition\.htm http://www.sats-logistics.com/umzug-spedition/  [R=301,L,NC]
RewriteRule ^kontakt-sats\.htm http://www.sats-logistics.com/kontakt-sats/ [R=301,L,NC]
RewriteRule ^standorte-sats\.htm http://www.sats-logistics.com/standorte-sats/ [R=301,L,NC]
RewriteRule ^downloads\.htm http://www.sats-logistics.com/downloads/ [R=301,L,NC]
RewriteRule ^impressum\.htm http://www.sats-logistics.com/impressum/ [R=301,L,NC]
RewriteRule ^news.php http://www.sats-logistics.com/news/ [R=301,L,NC]
RewriteRule ^links\.htm http://www.sats-logistics.com/links/ [R=301,L,NC]
RewriteRule ^daten/speditionsauftrag-luftfracht.pdf http://www.sats-logistics.com/download/speditionsauftrag-luftfracht.pdf [R=301,L,NC]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
AddHandler x-mapp-php5  .php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

此网址我也不想添加:

RewriteRule ^en/index\.php http://www.sats-logistics.com/en/ [R=301,L,NC]
RewriteRule ^en/ocean-freight\.htm http://www.sats-logistics.com/en/ocean-freight/ [R=301,L,NC]
RewriteRule ^en/air-freight\.htm http://www.sats-logistics.com/en/air-freight/ [R=301,L,NC]
RewriteRule ^en/custom-brokerage\.htm http://www.sats-logistics.com/en/custom-brokerage/ [R=301,L,NC]
RewriteRule ^en/warehouse-logistics\.htm http://www.sats-logistics.comen/warehouse-logistics/ [R=301,L,NC]
RewriteRule ^en/port-handling\.htm http://www.sats-logistics.com/en/port-handling/ [R=301,L,NC]
RewriteRule ^en/moving-relocation\.htm http://www.sats-logistics.com/en/moving-relocation/ [R=301,L,NC]
RewriteRule ^en/contact\.htm http://www.sats-logistics.com/en/contact/ [R=301,L,NC]
RewriteRule ^en/locations\.htm http://www.sats-logistics.com/en/locations/ [R=301,L,NC]
RewriteRule ^en/downloads\.htm http://www.sats-logistics.com/en/downloads/ [R=301,L,NC]

1 个答案:

答案 0 :(得分:0)

  

I´m searching since two days to find a solution

你应该早些时候来到Stackoverflow:P

更改规则的顺序并删除起始斜杠:

RewriteEngine On
RewriteBase /

RewriteRule ^luftfracht-spedition\.htm$ http://www.sats-logistics.com/luftfracht-spedition [R=301,L,NC]
RewriteRule ^en/custom-brokerage\.htm$ http://www.sats-logistics.com/en/custom-brokerage [R=301,L,NC]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]