简体   繁体   中英

PHP URL 'Redirecting'

Say if you visit my site: http://nesmods.com/page/2/ there isn't actually a /page/2/ on my site, Wordpress somehow catches the URL and generates a page based on the URL. What is the name of this technique?

This redirecting is managed by the mod_rewrite Module of Apache. Normally this is done in the .htaccess file. Depending on the configuration of your FTP program you can see them as hidden files in the Wordpress root directory.

Some further explanations and examples: http://www.workingwith.me.uk/articles/scripting/mod_rewrite - and Google of course.

Clean URLs apparently. Often done through .htaccess files.

There are a few ways to do this, referred to as URL routing or URL rewriting . Wordpress uses URL routing to map URL structures to it's internal functions that generate content.

It can also be done with the web server itself, such as URL Rewriting with Apache mod_rewrite

Apache有一个重写url的模块。这是一个很好的搜索引擎优化。这是关于重写的详细信息http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

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