简体   繁体   English

.htaccess 上出现意外的 404 重定向

[英]Unexpected 404 redirection on .htaccess

For this url: https://www.skatehype.com/a/viajes-tours-miguel-urbina/91.htm (and similar)对于这个 url: https://www.skatehype.com/a/viajes-tours-miguel-urbina/91.htm (和类似的)

RewriteRule ^a/(.*)/([0-9]+)\.htm$ index.php?site=a&a=$2

was a working redirection, untill today, that returns a not found 404.是一个有效的重定向,直到今天,它返回一个未找到的 404。

If I change "a/" for "a" it works again如果我将“a/”更改为“a”,它会再次起作用

RewriteRule ^a(.*)/([0-9]+)\.htm$ index.php?site=a&a=$2

Any ideas why "a/" is not working anymore?任何想法为什么“a/”不再起作用? I don't want to redirect /axxx... just /a/xxx...我不想重定向 /axxx... 只是 /a/xxx...

Similar redirects like类似的重定向

RewriteRule ^v/(.*)/([0-9]+)\.htm$ index.php?site=v&v=$2

still working good.仍然工作良好。 Thank you!谢谢!

I found it!我找到了!

a png file called "a.png" on root directory causes this.根目录上名为“a.png”的 png 文件会导致此问题。

Just renamed a.png to sprites.png and all goes to normal.刚刚将 a.png 重命名为 sprites.png ,一切正常。

Thank you @CBroe谢谢@CBroe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM