0

I'm sorry if this is a silly question. But I've searched the web for a really long time. I've googled keywords like "website admin login", "website only admin can login", etc. And I still don't know how to do it. Here is my problem:

I'm working on a simple blog system to learn web development. I want it to show the log in area only when I open the index page. When other people input the domain name of my blog site there is no log in area appeared, only the content I'd like to show to the others. How can I make it?

Should I check the IP address of agent? What if I want to update the website in multiple places? Like today I'm at home, I log in to my blog site and write a post. Then the other day I'm in a coffee shop and want to write a post too...

I don't know if the framework I use matters. But in case that matters... I use web.py..Thanks.

4

2 回答 2

0

只需将登录表单放在您未链接到的单独页面上,例如 my.blog.somewhere.com/admin。

于 2013-05-26T21:19:28.457 回答
0

您还可以在您的 .htaccess 文件中设置一个允许、拒绝命令,然后从站点所有者和模块的 IP 地址中输入拒绝所有、允许

于 2013-05-26T21:23:01.183 回答