开发者

Simple (?) redirect using .htaccess

this is probably simple but i don't know how to do it.

I want all links of this form: http://www.fractalbit.gr/archives/xxx to redirect to this: http://www.fractalb开发者_运维百科it.gr/?p=xxx


RedirectMatch .*\/archives\/(.+) http://www.fractalbit.gr/?p=$1

RedirectMatch in Apache docs


Something like this?

RewriteEngine on
RewriteRule ^archives/(.+)$ ?p=$1

All depends however, a lot on whether you are allowed to use .htaccess in such a way. Stuff like this is not always permitted by webhosts.

PS: this is called rewriting as opposed to redirecting, but I think this is what you mean.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜