Example of regexp
Permalink Browser Info Environment
Hi,
I want to create a redirect rule for all countries in the Americas, 51 Country Codes.
AV AC AA BF BB VI CJ CU DO DR GJ GP HA JM MB MH RQ SC ST RN VC TD TK VQ BH CS ES GT HO MX NU PM AR BL BR CI CO EC FK FG GY PA PE NS UY VE BD CA GL SB US
How do I specify the regexp in that case?
I want to create a redirect rule for all countries in the Americas, 51 Country Codes.
AV AC AA BF BB VI CJ CU DO DR GJ GP HA JM MB MH RQ SC ST RN VC TD TK VQ BH CS ES GT HO MX NU PM AR BL BR CI CO EC FK FG GY PA PE NS UY VE BD CA GL SB US
How do I specify the regexp in that case?
Type: | Discussion |
---|---|
Status: | In Progress |
Oups, I just saw you are using the 5.6 version which does not come with state matching at all… so you really *have to* use the country matching.
If you come accross the 5.7 version, you will have the state matching. 5.6 is Concrete5 legacy, and only bugfixes happen here :)
If you come accross the 5.7 version, you will have the state matching. 5.6 is Concrete5 legacy, and only bugfixes happen here :)
Link to 5.7 version (but that requires you to upgrade your site to 5.7):
https://www.concrete5.org/marketplace/addons/maxmind-ip-geoloc-for-5...
https://www.concrete5.org/marketplace/addons/maxmind-ip-geoloc-for-5...
It is country that I want to match on. The codes is for every country in south, central and north -America.
So thanks for the advice, the pipe was what I was after.
So thanks for the advice, the pipe was what I was after.
I've separated the country codes with pipe but I still cannot get it to work.
Switching to exact match and only typing SE gives me the desired result.
Switching to exact match and only typing SE gives me the desired result.
you should try lowercase
se|dk
se|dk
Still no difference.
can you activate debug and give me the log?
I did, but can't figure out where the log is located.
each trace is shown in concrete5 logs
[Redirect Americas#0] no assertion successfully matched the incoming visitor, rule is skipped
There should be other lines before that ?
Can you PM me an access to your site so I get a look?
Also does it work if you only input one name as the regex ? (eg: se)
there may be something wrong here… Can you PM me a link to your site with an access (and preferably and ssh access too so I can give a try to check what's going wrong) ?
Please do not post any credentials here, this forum is somehow public …
Can you PM me an access to your site so I get a look?
Also does it work if you only input one name as the regex ? (eg: se)
there may be something wrong here… Can you PM me a link to your site with an access (and preferably and ssh access too so I can give a try to check what's going wrong) ?
Please do not post any credentials here, this forum is somehow public …
The "Country" field for any of the states of the US would be "US", so simply using the country would be enough to get you sorted.
Nevertheless if you wanted to match all states (in the states field), you would separate your alternative by | (pipe), example to match foo or bar you type foo|bar, so for your example:
AV|AC|AA|BF|BB|VI
and so on.
There again, using the Country matching would be a lot easier IMO.