开发者

How to add a default splash screen without the use of .htaccess

I'm looking for a method to s开发者_运维问答uspend access to a website without loosing the old files, by adding a file to the directory but not .htaccess, since the use of .htaccess has been disabled on the specific server. Are there other ways to do this by using php or another method?


rename your www-root directory and add another, empty one.


You have to rename your index.php, create a new one, and add:

<?PHP header("Location: http://disney.com"); // or something ?>

Also, you may want to check Apache's DirectoryIndex directive, the order of the "default page" is defined here. If your server have DirectoryIndex index.html index.php, the html extension is prior to the php, so You can create a file index.html with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Jump page</title>
<meta http-equiv="REFRESH" content="0;url=http://disney.com"></HEAD>
<BODY>
Jumping
</BODY>
</HTML>

But if You want to "remove" all files recursively, You have to move the whole directory. Another option is to rewrite the url http://yourpage.com/hidden_directory/ to somewhere, but sadly You need .htaccess to do that, if You can't access the webserver's config file. If You can:

<Directory /path/to/dir/>
            RewriteEngine On
            RewriteRule ^/hidden_directory/$  http://disney.com [L}
</Directory>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜