|
|
How to enable SEF?
To enable SEF (Search Engine Friendly URLs):
Since 1.8.7: This option is available in "System" -> "Configuration".
Before 1.8.7: Edit file /inc/config.inc.php and set $sys['is_mod_rewrite'] = 1;
The ability to use SEF is available since version 1.4.1 (November 11, 2002).
How it works
After enabling SEF, Glossword will change all links as follows:
A dictionary title page: /index.php?a=list&d=1 => /index.php/list/1.xhtml
A term page: /index.php?a=term&d=1&t=123 => /index.php/term/1,123.xhtml
Since 1.8.4, Apache module mod_rewrite is no more needed. You don't have to edit .htaccess file.
Since 1.8.4, there is an additional modes for the way of creating links:
- Numeric only. Uses numeric-only Item IDs for dictionary, term, and custom page, i.e. &d=1, &t=2345.
- Alphanumeric. Uses ASCII-only Item Names for dictionary, term, and Page URI for custom page, i.e. &d=Dictionary-Name, a=viewpage&id=page_uri
- Text. Uses url-encoded item names for dictionary, term, and custom page, i.e. &d=Dictionary+Name, a=viewpage&id=Page Name.
How to enable additional modes
Since 1.8.7:
Available in "System" -> "Configuration". Link creation mode: Numeric only | Alphanumeric | Text.
Since 1.8.4:
Edit file /inc/config.inc.php, search for $sys['pages_link_mode'].
Possible values for $sys['pages_link_mode']:
- GW_PAGE_LINK_ID = Numeric only.
- GW_PAGE_LINK_URI = Alphanumeric.
- GW_PAGE_LINK_NAME = Text.
These settings apply for both SEF-enabled or disabled modes.
Finally, by enabling SEF and changing $sys['pages_link_mode'] it is possible to have links like http://domain.tld/index.php/viewpage/Feedback.xhtml and http://domain.tld/index.php/term/Tourism,Air broker.xhtml.
$sys['is_mod_rewrite'] = 1; $sys['pages_link_mode'] = GW_PAGE_LINK_NAME;
