繁体   English   中英

如何在 php 中借助 .htaccess 重定向多个文件

[英]how to redirect multiple file with the help of .htaccess in php

 <!-- multiple redirection of file is not working --> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)$ category.php?catname=$1 [L,N] RewriteCond %{QUERY_STRING} !-d RewriteCond %{QUERY_STRING} !-f RewriteRule ^(.*)$ fullview.php?view=$1 [L] <!--end -->

只需替换您的根文件夹

RewriteEngine on
RewriteBase /Your root folder name
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

暂无
暂无

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

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