Forums/Coming Soon Pro Plugin

Exclude and Include Urls Pattern Examples

John Turner
posted this on January 31, 2013 11:55 AM

To exclude or include multiple pages use the pattern below.

Example URLs:

http://example.com/about-us/

http://example.com/contact-us/

http://example.com/login/

To exclude multiple urls we can use the pipe |

So to exclude the urls about we can use this pattern:

about|contact|login 

So any urls with the words about or contact or login will now be excluded.

Also see: Only show the Coming Soon page on the your home page

 

Comments

User photo
Mark Whitby

This is great info, was looking for syntax. So this includes pages like /contact-me or /login-thank-you or /about-the-site ??? can it be down to specific pages, could we add "about-us|contact-us|login-now to get narrowed down to pages not word matches?

Can you give us some general  syntax examples and globals

February 16, 2013 02:09 AM
User photo
John Turner
SeedProd

Yep that works as well. You can get as specific as you want. Post your URLs and I can provide more examples.

February 16, 2013 08:42 AM
User photo
Robert Huber

Hi John,

I need to exclude the Wysija newsletter confirmation page from showing my coming soon page.

The Wysija page URL looks like this

http://url.com/?wysija-page=1&controller=confirm&wysija-key...

I tried ?wysija-page* to add to "Exclude URL Pattern" but it's not working.

Any idea

Thanks
Robert 

April 24, 2013 04:47 AM
User photo
John Turner
SeedProd

Hi Robert,

Use "wysija-page" without the quotes and that should work!

April 24, 2013 09:01 AM
User photo
Richard Lodge

Hi John,

In the advanced section I am having a bit of trouble getting Coming soon to display on the right pages.  

If coming up acts on all pages how can I exclude and include pages at the same time

If you look at my site  www.ramigrafx.com     at the moment I just want to exclude Gallery 1 and Gallery 2

Thanks,

Richard

 

April 26, 2013 04:57 AM
User photo
John Turner
SeedProd

So you would just put this in the exclude field:

gallery-1|gallery-2

If you still have an issue open up a ticket and I can login and take a look.

April 26, 2013 10:24 AM
User photo
Steve McMackin

Is it possible to exclude subdomains, i.e., mail.domain.com? I tried 'mail' and it still shows.

Awesome plugin, btw.

May 24, 2013 11:15 AM
User photo
John Turner
SeedProd

Thanks Steve! Does your site run have more than one domain?

May 24, 2013 11:18 AM
User photo
Steve McMackin

No, just the one. Not a multisite install.

May 24, 2013 11:56 AM
User photo
John Turner
SeedProd

Maybe I'm not under standing your question. I assume you have www.domain.com pointed at your site. Mail.domain.com typically points to your mail servers. If you want open a ticket with the specific details and I can take a look.

May 24, 2013 11:59 AM
User photo
Steve McMackin

Hey, you know what, you are right - the issue was that it is a mail server and was directing to the frontpage. Don't mind me...

May 27, 2013 01:04 AM
User photo
Aaron Clancy

hi John,

i have a website at www.domain.com which I need to be hidden as under construction. However, we have created a unique page that matches our theme at www.domain.com/coming-soon

how do we show the /coming-soon page as the default landing page when people get on the site?

June 25, 2013 11:23 AM
User photo
John Turner
SeedProd

So you want to redirect people to  http://domain.com/coming-soon when they visit and have this show a coming soon page? If not sure I understand your scenario, 

By default when the plugin is enabled it shows the coming soon page on the entire site.

June 25, 2013 11:35 AM
User photo
Aaron Clancy

John,

yes that's correct. just like with the default settings, no matter what page of the site someone visits they get sent to the homepage which displays the Coming Soon default template. 

i want to replicate this with a custom page we have created that matches our theme (/coming-soon) so that wherever someone visits the site, they only see the /coming-soon page. At the moment with the exclude path they have to actually go to /coming-soon to see that, otherwise the default landing page is shown.

is this even possible or is it better to try something different?

June 25, 2013 11:39 AM
User photo
John Turner
SeedProd

It's possible you just need to implement a redirect for user that are not logged in to goto /coming-soon.  Here's snipplet on how to do this.  http://madebyraygun.com/blog/2012/wordpress-snippet-redirect-all-no...

 

There might be a plugin out there as well that can do it.

June 25, 2013 11:44 AM
User photo
Aaron Clancy

thats excellent. thanks John.

if I implement that instead of using Coming Soon on that site, will admin's still be able to bypass the redirect and go to /wp-admin  to login?

June 25, 2013 11:47 AM
User photo
John Turner
SeedProd

yep, that should be the case. you actually want to goto /wp-login.php

June 25, 2013 11:49 AM
User photo
Aaron Clancy

got it. legend. thanks John.

June 25, 2013 11:55 AM
User photo
John Turner
SeedProd

cool! ;)

June 25, 2013 11:56 AM
User photo
Aaron Clancy

Hi John

I tried the above method but it causes an error which causes the site not to show - "

This webpage has a redirect loop'

do you know any plugins that I can use instead which will avoid this?

July 01, 2013 01:51 PM
User photo
John Turner
SeedProd

Can you open up a ticket with the details and I'll take a look.

July 01, 2013 01:53 PM
User photo
Michael Scott

I want to exclude:

http://example.com/about-us/

http://example.com/contact-us/

http://example.com/login/

but also  the home page as below. What is the regular expression for this?

http://example.com

 

Thanks Mick

August 23, 2013 09:31 AM
User photo
John Turner
SeedProd

Hi Mike,

This pattern bellow represents the hime page:

^\/$

So to exclude the home and about you'd do this:

^\/$|about

August 23, 2013 12:57 PM
User photo
Aaron Fein

...ok, this has all been very helpful...

 

so, I have a basic issue: how do I properly express an exclusion pattern for only exactly the desired string? as in:

example.com/privacy-policy

(but NOT example.com/3privacy-policy OR example.com/privacy-policy76 OR example.com/privacy-policy/whatnext)

 

currently, I am using the following:

 

^\/privacy-policy$|^\/additional-page$|...

 

this works almost 100% the way I want it too... except that it only works if I fail to follow my URLs with a trailing slash... (example.com/privacy-policy VS example.com/privacy-policy/)

 

I have tried simply using ^\/privacy-policy$/ but that breaks the code... I don't know regular expressions, I managed to hack this this far, but haven't been able to figure how to include that trailing slash...

 

cheers ;-P

August 31, 2013 10:30 AM
User photo
Aaron Fein

edit: I meant to type ^\/privacy-policy/$ instead of ^\/privacy-policy$/ in my last paragraph... aloha

August 31, 2013 10:33 AM
User photo
John Turner
SeedProd
Try this. \/privacy-policy\/$

Not at home to test but will test when I get home later today
August 31, 2013 11:04 AM
User photo
Aaron Fein

That seems to work (at least I haven't been able to break it... yet)

The remaining issue is case sensitivity... Ideally, this exclusion would tolerate changes in case (example.com/privacy-policy/ AND example.com/Privacy-Policy/)

 

Specifically, I am thinking of 'poetic' user-generated link text...

Is it possible to tweak \/privacy-policy\/$ toward such a use?

To be clear, \/privacy-policy\/$ is doing what I needed for the trailing slash, this would be icing...

 

Thanks for your help, getting past this hurdle means a whole heap to us... ;-)

 

 

August 31, 2013 12:14 PM
User photo
John Turner
SeedProd

Add a /i to the end to make it case insensitive.

August 31, 2013 04:41 PM
User photo
Aaron Fein

You are a RockStar! (and you made a really good product!)

Thank You!

;-)

August 31, 2013 04:52 PM
User photo
John Turner
SeedProd

Thanks for the kudos :) 

August 31, 2013 04:54 PM