[英]Wordpress permalink with trailing slash give 404
我在這個網址上有wordpress:
http://www.website.com/blog/
如果我嘗試打開任何帖子,則該網址僅適用於:
http://www.website.com/blog/%postname%
當我嘗試在末尾添加斜杠時,出現錯誤404。
http://www.website.com/blog/%postname%/
這是我的.htaccess
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>
也許您可以嘗試重新生成永久鏈接並在Wordpress設置中設置自定義結構。
http://www.website.com/%category%/%postname%/
我發現了錯誤:
這是URlScan,它阻止了我的Urls,因為其中一些包含點。
示例: http://website.com/blog/test-3.0/style/foo.css
: http://website.com/blog/test-3.0/style/foo.css
我打開了位於以下位置的UrlScan.ini文件:
%windir%\system32\inetsrv\urlscan\UrlScan.ini
並將AllowDotInPath = 0更改為AllowDotInPath = 1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.