简体   繁体   中英

SEO Friendly dynamic urls

Good morning,

I am building a new website and i would like to make the urls SEO friendly. 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?

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?

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. Maybe this will help:

Rewrite all requests to index.php with nginx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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