【发布时间】:2015-12-29 22:24:10
【问题描述】:
我的服务器人员无法解决我遇到的问题。我在根文件夹上运行 Wordpress。我不想有英语的文件夹语言。
https://domain.com/account/t/
https://domain.com/fr/account/t/
工作正常,同样适用于:
https://domain.com/auth/
但是
https://domain.com/fr/account/t/myaccount/
工作正常,但不是
https://domain.com/account/t/myaccount/
网址相同:
https://domain.com/fr/account/t/tests/
工作正常,但不是
https://domain.com/account/t/test/
它重定向到 www.domain.com...
有人有想法吗?这是我的 htaccess 文件:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([^/]*)/auth/$ /auth/?lang=$1 [L]
RewriteRule ^([^/]*)/auth/login$ /auth/login.php?lang=$1 [L]
RewriteRule ^([^/]*)/auth/logout$ /auth/logout.php?lang=$1 [L]
RewriteRule ^([^/]*)/auth/registration$ /auth/registration_form.php?lang=$1 [L]
RewriteRule ^([^/]*)/auth/password-forgotten$ /auth/forgot_form.php?lang=$1 [L]
RewriteRule ^([^/]*)/auth/reset$ /auth/reset.php?lang=$1 [L]
RewriteRule ^([^/]*)/auth/activate$ /auth/activate.php?lang=$1 [L]
RewriteRule ^([^/]*)/account/$ /account/?lang=$1 [L]
RewriteRule ^([^/]*)/account/t/$ /account/t/?lang=$1 [L]
RewriteRule ^([^/]*)/account/t/jobs/$ /account/t/jobs.php?lang=$1 [L]
RewriteRule ^([^/]*)/account/t/myaccount/$ /account/t/myaccount.php?lang=$1 [L]
RewriteRule ^([^/]*)/account/t/([^/]*)$ /account/t/?lang=$1&step=$2 [L]
RewriteRule ^([^/]*)/account/t/tests/$ /account/t/testspage.php?lang=$1 [L]
RewriteRule ^([^/]*)/account/c/$ /account/c/?lang=$1 [L]
RewriteRule ^([^/]*)/account/c/([^/]*)$ /account/c/?lang=$1&step=$2 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
【问题讨论】:
标签: php wordpress apache .htaccess mod-rewrite