我的论文中有一个网站,他们发布了我的地址......
www.mysite.com/about.php。
如果您访问上面的内容,请将404作为php结尾的dot
...
在htaccess中有没有办法可以将它重定向到正确的页面?
当前的htaccess
RewriteEngine On
RewriteRule ^(.*)\.php\. $1.php
RewriteRule ^people/([^/]*)/([^/]*)/([^/]*)$ /profile.php?county=$1&name=$2&id=$3 [L]
RewriteRule ^people-in-(.*) /people.php?county=$1 [L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.co.uk$
RewriteRule (.*) http://www.mysite.co.uk/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/index.php$
RewriteRule (.*) / [R=301,L]
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
ErrorDocument 404 /notfound.php
答案 0 :(得分:1)
这个RewriteRule
可以解决问题:
RewriteRule (.*\.php)\.$ /$1 [R=301,L]
答案 1 :(得分:0)
这应该有效:
RewriteRule ^(.*)\.php\. $1.php
答案 2 :(得分:0)
试试这个:
RewriteEngine On
RewriteRule ^(.*)\.php\.$ $1.php [L]