简体   繁体   English

SEO友好的动态网址

[英]SEO Friendly dynamic urls

Good morning,早上好,

I am building a new website and i would like to make the urls SEO friendly.我正在建立一个新网站,我想让网址 SEO 友好。 The folder structure is as follow:文件夹结构如下:

/index.php                           <-- first page
/frame.php                           <-- page wrapper which includes all the modules
/modules                             <-- All the modules
/modules/en/module-name/index.php
/modules/en/module-name/page2.php
/modules/en/module-name/page3.php
/modules/en/module-name-2/index.php
...

How can i make a .htaccess mod rewrite that allows me to visit the next urls to go to the pages above, and keep the structure the same for new urls?我如何进行 .htaccess mod 重写,允许我访问下一个 url 以转到上面的页面,并保持新 url 的结构相同?

So i would like to go to:所以我想去:

http://www.url.com/en/module-name/         ===   http://www.url.com/frame.php?page=en/module-name/index.php
or
http://www.url.com/en/module-name/page3    ===   http://www.url.com/frame.php?page=en/module-name/page3.php
etc

I have multiple domain LTD's so i prefer to not include the domain name Is this possible?我有多个域 LTD,所以我更喜欢不包含域名 这可能吗?

Thanks for everyones help!感谢大家的帮助!

If you want to make your urls SEO friendly (and also don't want your urls to look like they come from the 2000s) you could use NGINX.如果您想让您的网址对 SEO 友好(并且不希望您的网址看起来像是来自 2000 年代),您可以使用 NGINX。 Maybe this will help:也许这会有所帮助:

Rewrite all requests to index.php with nginx 用 nginx 重写所有对 index.php 的请求

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

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