Question

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!

Était-ce utile?

La solution

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

RewriteEngine On
RewriteRule /index.cfm$ /mem/index.cfm [QSA,L]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top