创建用于重定向无效URL的自定义htaccess代码的指南

时间:2014-03-24 19:34:27

标签: apache .htaccess redirect

STRING:英文字母小写

NUMBER:英文N编号0-9,例如:23123

Archives和m是关键字。

这是我网站的有效domian网址:

            Main domain: www.mysite.com

    1- http://www.mysite.com/string
       example:
       http://www.mysite.com/hw

    2- http://www.mysite.com/string/string
       example:
       http://www.mysite.com/hw/tablet

    3- http://www.mysite.com/string/number
       example:
       http://www.mysite.com/it/23234

    4- http://www.mysite.com/m/string/number
               example://m is a keyword         
               http://www.mysite.com/m/tablet/12314

        5- http://www.mysite.com/archive/everything
           //archives is a keyword. anything in valid after that. for example:
           http://www.mysite.com/archive/12/4/2012
           http://www.mysite.com/archive/string
           http://www.mysite.com/archive/string

你能帮我写一个htaccess代码来接受这种格式吗?(对于其他格式我想重定向到www.mysit.com/404!:)

0 个答案:

没有答案