aks_301
Current version: 0.1
Now plugin aks_301 included in aks_header (2 in 1)
Please use aks_header
aks_301 – Simple 301 redirect with conditions
Summary
This plugin useful for redirect non exist pages or directories to other place.
Default: to domain root.
Tags
<txp:aks_301 /> — place this tag !!!ONLY!!! to start your page.
Sample my error_default page:
<txp:aks_301 start="/categories/|/article/" /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> [skip...]
Attributes
| Attribute | Default | Description |
|---|---|---|
| start | '' | one or more conditions. Delimiter: | |
| url | 'http://yourdomain.com/' | url for 301 redirect. Default – your domail root |
.
Examples
error_default page:
<txp:aks_301 start="/categories/" url="http://mydomain.com/somepage.html" /> all non exist pages in /categories/* - 301 redirect to http://mydomain.com/somepage.html
<txp:aks_301 start="/categories/|/section1/" /> all non exist pages in /categories/* and /section1/* - 301 redirect to domain root
<txp:aks_301 start="/" /> ALL non exist pages - 301 redirect to domain root
default page:
<txp:aks_301 start="/categories/" url="http://mydomain.com/somepage.html" /> all EXIST pages in /categories/* - 301 redirect to http://mydomain.com/somepage.html
<txp:aks_301 start="/" url="http://otherdomain.com/" /> ALL EXIST pages - 301 redirect to http://otherdomain.com/