开发者

Simple (?) redirect using .htaccess

开发者 https://www.devze.com 2023-01-17 11:14 出处:网络
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

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

精彩评论

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