我的脚本面临错误 404。
我想隐藏页面标题。 例如
http://example.com/final/admin/admin.php
我想隐藏admin.php
http://example.com/final/admin
这是我的.htaccess,它总是返回404页面未找到错误
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/final/.*$
RewriteRule ^(.*)$ /final/$1 [L]
这是我的索引.php代码
<?php
/**
* @author Mina Wilson
* @copyright 2012
* // EPCI Pharma Survey | Rights Reserved
*/
// Inialize session
session_start();
echo $_SESSION['message']; unset($_SESSION['message']);
ob_start();
session_destroy();
// Check, if user is already login, then jump to secured page
ob_start();
if (isset($_SESSION['name'])) {
header('Location: login_process.php');
}
ob_flush();
?>
-- html here
谁能告诉我出了什么问题?
像这样使用重写规则。您可以单独使用重写规则
RewriteRule final/(.*)$ index.php?page=$1 [NC,L]
但这会将最后一个单词之后的任何页面重定向到索引.php