Rewrite Sub Link
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
In brief, this project could help you rewrite the URLs.
1. sub urls of node and user will be rewritten when the parent url has an alias.
2. you can use regex to rewrite any url if you want
NOTICE: no need to enable this module, just include the core in your settings.php
In Drupal, we have node and user. In many cases, node|user has many sub-tab menu, such as node/%/info node/%/devel and any other MENU_LOCAL_TASK.
If you use url_alias, you need to add alias for each of them. This module, Rewrite Sub Link, will help you rewrite them automatically, and which doesn't user url_alias, so when you have millions of node, it won't case a performance issue.
Additionally, this module support regular express, so you can write your regular express to change your URL.
Light-weight Usage
add this line in the settings.php file,include_once "sites/all/modules/contrib/rewrite_sub_link/rewrite_sub_link.core.inc";
add your custom settings in your settings.phpinclude_once "path_to_your_custom_rewrite_settings.php"
or change the code in rewrite_sub_link/rewrite_settings.php directly.
then all the sub links of user and node will be rewritten automatically.
Please check rewrite_settings.php file and change for your custom settings.
NOTICE
This module is using code as settings, and didn't save many settings in Drupal db as Drupal way. Since url_rewrite function is called by everywhere in drupal core, so the performance is very important.
Similar projects
URL alter Inbound URL has problem, since it didn't include the file before module loading.
Galaxy Url Rewrite Not automatically support sub tab menu, you need to set url manually which save into db. Neither does 'Galaxy Url Rewrite' support Regular Express.
[Chinese]
模å—主è¦ä½œç”¨
ä¸ç”¨aliasæ¥é‡å†™Drupalçš„URL
1. é‡å†™node或userçš„åURL
比如 node/%/info user/%/info
2. æ”¯æŒæ£åˆ™è¡¨è¾¾å¼é‡å†™URL
æ£åˆ™è¡¨è¾¾å¼æ”¯æŒè‡ªå®šä¹‰å‡½æ•°
模å—使用方法
在settings.php最åŽé¢åŠ ä¸Šä¸‹é¢çš„代ç (注æ„修改路径)include_once "sites/all/modules/contrib/rewrite_sub_link/rewrite_sub_link.core.inc";
(å¯é€‰ï¼‰ç„¶åŽå¯ä»¥ä¿®æ”¹æ¨¡å—下é¢çš„rewrite_settings.phpï¼Œå¦‚æžœä¸æƒ³ä¿®æ”¹æ¨¡å—代ç ,å¯ä»¥åœ¨settings.php里é¢å†includeè¿›æ¥è‡ªå®šä¹‰çš„settings文件。
Powered by 广州Drupalå¼€å‘ | Drupal 与高性能网站架构
