문제

I need to redirect links from external pages to an application into a subfolder.

My "old" links where like this:

 https://www.somepage.com/index.cfm?id=abc

Which I now have to change to:

 https://www.somepage.com/mem/index.cfm?id=abc

While I informed all users to update their links, I'm sure I will have to chase some for a while, so my idea was to try and setup a redirect server side. What I'm not sure is how to preserve the url parameter on the re-direct. Is something like this possible at all?

Thanks for some insights!

도움이 되었습니까?

해결책

Use the QSA (Query String Appended) to preserve the query string. Try :

RewriteEngine On
RewriteRule /index.cfm$ /mem/index.cfm [QSA,L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top