+ Start a Discussion

URL Redirect

Is there any wildcard or way to setup so it doesn't do an exact match.


I want to do a redirect anytime it hits a relative url like /detail/foo ... however if it has a querystring it ignores it  so this does nothing 



Tried a variety of different formats but no luck.  Not sure it is possible.




There is no wildcard support for URL redirects.


You could likely use a regex expression using the pattern and matcher classes to sort out urls. Or even a simple url.contains('?id=') might be a quick solution for you.


You can use a regex for URL rewriting, but not with redirects. 


Ooops... redirect not rewrite. Sorry for the misinformation.

If you're trying to set up a "URL Redirect" that ignores the query string, inside site.com you want to use a "matchless alias." To do this you go into Site Configuration > URL Redirects and create a new redirect. Select "Alias" for Redirect Type and then make sure the "Match" checkbox is NOT checked. You'll then have a matchless alias that will ignore the query string.