简体   繁体   English

图像网站的php中的URL和文件系统结构

[英]URL and file system structure in php for a Image Website

I want to build a image website like this 我想建立一个这样的图片网站

  • ex.com/en-us/lion-wallpapers.html ex.com/en-us/lion-wallpapers.html
  • ex.com/en-gb/lion-wallpapers.html ex.com/en-gb/lion-wallpapers.html
  • ex.com/en-in/lion-wallpapers.html ex.com/en-in/lion-wallpapers.html

and i want to use single image path to be go through in multiple urls using routing 我想使用单个图像路径使用路由在多个URL中通过

  • images/lion/lion.jpg 图片/狮子/狮子.jpg

.....is google only crawls single image with urls ??? ..... is google仅使用网址抓取单个图片吗? or am i need to maintain individual directories and make them to copy on each directory?? 还是我需要维护单个目录并使其在每个目录上复制? so suggest me some best practises and URL srtructure for this ... 所以建议我一些最佳做法和URL结构...

For URL structure like this your better off using a framework that has support for routing and then building your website in a Model-View-Controller(MVC) pattern. 对于这样的URL结构,最好使用支持路由的框架,然后以Model-View-Controller(MVC)模式构建您的网站。

This is quite abstracted architectural stuff so I can't really give specific examples. 这是非常抽象的体系结构内容,因此我无法真正给出具体示例。

Any framework that supports routing would work but an example is Zend Framework: http://framework.zend.com/ 任何支持路由的框架都可以使用,但是Zend框架就是一个例子: http : //framework.zend.com/

Here's their documentation on routing: http://framework.zend.com/manual/1.12/en/zend.controller.router.html 这是他们有关路由的文档: http : //framework.zend.com/manual/1.12/en/zend.controller.router.html

With routing you would be able to one lion-wallpapers.html page that then depending on the URL changes the language on the page. 通过路由,您将可以转到一个lion-wallpapers.html页面,然后根据URL更改页面上的语言。

In terms of how google will crawl your site, it will crawl your websites using links from your first page and anything you add to a sitemap. 在Google如何抓取您的网站方面,它将使用您首页上的链接以及您添加到站点地图中的任何内容抓取您的网站。 You can help customise how it crawls your website by adding your site to Google Webmaster tools here: https://www.google.com/webmasters/tools/home?hl=en 您可以通过将您的网站添加到Google网站站长工具中来帮助自定义网站的爬网方式: https : //www.google.com/webmasters/tools/home?hl=zh_CN

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

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