English 中文(简体)
D. 帮助形成改观者统治
原标题:Need help forming mod_rewrite rule

Ok on my site I want it to be so when people visit http://mysite.com/201209041 it will redirect to http://mysite.com/[first 4 digits]/[next two digits]/[next two digits]/[all other digits]/index.html so in my example it would redirect to http://mysite.com/2012/09/04/1/index.html and in another example http://mysite.com/20120904259872 would redirect to http://mysite.com/2012/09/04/259871/index.html

我如何这样做?

最佳回答

当然,你可以像这样分开:

RewriteRule ^(d{4})(d{2})(d{2})(d*)$ /$1/$2/$3/$4/index.html [L,R]

我认为,一种价格指数办法是更好的选择。

问题回答

暂无回答




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签