.htaccess 显示未找到URL的其他页面的内容
当用户访问一些未找到的url时,如.htaccess 显示未找到URL的其他页面的内容,.htaccess,.htaccess,当用户访问一些未找到的url时,如domain.com/blogs/blogs1/randomblabla.html,我需要他们显示domain.com/blogs/blogs1/index.php的内容 我尝试了下面的方法,并将代码放在domain.com/blogs/blogs1/.htaccess,但它显示了主页的内容(domain.com/index.php),但我需要显示domain.com/blogs/blogs1/index.php的内容 RewriteEngine On Rewr
domain.com/blogs/blogs1/randomblabla.html
,我需要他们显示domain.com/blogs/blogs1/index.php
的内容
我尝试了下面的方法,并将代码放在domain.com/blogs/blogs1/.htaccess
,但它显示了主页的内容(domain.com/index.php),但我需要显示domain.com/blogs/blogs1/index.php
的内容
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)(\/?)$ / [QSA,NC,L]
在.htaccess中进行简单的404重定向就足够了吗
ErrorDocument 404 index.php