admin管理员组文章数量:1026156
Is there any way to dynamically redirect URLs. For example, I want to redirect any URL from to
https://examplecom/?p=NNNNN
.
Where NNNNN
could be any possible numbers.
For example: should redirect to
/?p=1796
.
Is there any way to dynamically redirect URLs. For example, I want to redirect any URL from https://example/NNNNN
to https://examplecom/?p=NNNNN
.
Where NNNNN
could be any possible numbers.
For example: https://example/1796
should redirect to https://example/?p=1796
.
- Redirect or rewrite? – Krzysiek Dróżdż Commented Apr 1, 2019 at 6:37
1 Answer
Reset to default 2StackOverflow has already an answer for your question: https://stackoverflow/questions/2551553/htaccess-redirecting-dynamic-url
I guess that this should do the trick:
RewriteRule ^(\d+)$ /?p=$1 [R=302,L]
Is there any way to dynamically redirect URLs. For example, I want to redirect any URL from to
https://examplecom/?p=NNNNN
.
Where NNNNN
could be any possible numbers.
For example: should redirect to
/?p=1796
.
Is there any way to dynamically redirect URLs. For example, I want to redirect any URL from https://example/NNNNN
to https://examplecom/?p=NNNNN
.
Where NNNNN
could be any possible numbers.
For example: https://example/1796
should redirect to https://example/?p=1796
.
- Redirect or rewrite? – Krzysiek Dróżdż Commented Apr 1, 2019 at 6:37
1 Answer
Reset to default 2StackOverflow has already an answer for your question: https://stackoverflow/questions/2551553/htaccess-redirecting-dynamic-url
I guess that this should do the trick:
RewriteRule ^(\d+)$ /?p=$1 [R=302,L]
本文标签: Is it possible to dynamically redirect URL using htaccess
版权声明:本文标题:Is it possible to dynamically redirect URL using htaccess? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745636537a2160484.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论