开发者

How to create subcategories on website?

I want to create subcategories on my website, I know I can just save files within folders, such as:

http://www.mysite.com/category/content.html

but how can I allow a user to go to the following page?

http://www.mysite.com/category/

Any advise would be much apprec开发者_JAVA百科iated as I'm really stumped!


It depends on server configuration, but usually you just create /category/index.html


you need to set default page for each sub directory (usually it is index.html, but you can set your own). It is done in your server configuration.

You can also consider URLrewriting so that URLs doesn't have to match physical content on the server


For directory (or folder) URI's your webserver may do one of two things: it will either list the files and subfolders within that directory, or will look for a default page to return: usually this is "index.html" or possibly "home.html" or something similar.

If you check your webserver's config file the behaviour (list contents or default page) and, in the case of default page, which page is returned will be specified. You will also be able to over-ride this and specify someother default page if you like.


Your web server will in most cases be configured to return a default page when you enter the folder. Usually this is index.html.

So if you put index.html (or other default filename) in the http://www.mysite.com/category/ folder your users will see the page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜