Quick Nav:  Online Store   |   Login | Register
PrevPrev--NextNext
PageBlaster Rules! Share your rules here!!
Last Post 06 Nov 2009 02:22 PM by jameskuk. 37 Replies.
Page 2 of 2 << < 12
Please Register to participate.
Sort: Print topic: Printer Friendly
AuthorMessages
Edvard Pitka
New Member
Posts:18


Send PM:Send Private Message

--
29 May 2008 10:07 AM

I modified title rule as it was not taking in consideration possible new line in the title and additional attributes in span element

search for:

(?s)<title>.*?</title>(.*?)<span\s+id="Title".*?>(.*?)</span>

replace with:

<title>$2</title>$1 

 



Edvard Pitka
New Member
Posts:18


Send PM:Send Private Message

--
29 May 2008 10:16 AM

Darn it, I tried three times to preview and it shows code but when I save it removes everything. How do you post code here?



llong
Posts:113


Send PM:Send Private Message

--
29 May 2008 10:22 AM

Put spaces after the less than character. ie:

<  p>

this would be a paragraph

<  /p>



John Mitchell
Veteran Member
Posts:4384

Avatar

Administrator
Send PM:Send Private Message

--
29 May 2008 10:23 AM

Wrap it with < code>< /code> (without spaces in the tag)
It works better if you do it from the Quick Reply.

You can also just make sure there is a space after any <



John Mitchell
Veteran Member
Posts:4384

Avatar

Administrator
Send PM:Send Private Message

--
29 May 2008 10:25 AM

Another way to make sure that it is not copied wrong if someone else wants to use it is to attach a file with a .txt extension that has your code.



Edvard Pitka
New Member
Posts:18


Send PM:Send Private Message

--
29 May 2008 12:41 PM

Here we go, two rules for the title


Attachment: 1529452883171.txt

DavidWSnow
Posts:218


Send PM:Send Private Message

--
29 May 2008 01:25 PM

At www.AgingSafey.com I have about 40 portals (such as comfortcare.agingsafely.com)  and most of them use PageBlaster rules for the Title and Description as well as xhtml cleanup and other functions.  I thought that I would try John's < code> .... < /code>  method of entering rules here just to test it.

I tried  different ways using < code> and Active Forum eat some of the rule each time - Yuk

The ways that I tried were:

  1. Staying in the normal mode of the editor and putting the < code>< /code> then instering the Search For and Replace with rules inside. This producded a line line for each rule wich included < p> tags etc.
  2. Switching to Source Mode when inserting the < code etc. When you get out of source mode the stuff you created is invisable. After you submit it it becomes visible but some <'s are missing!

Maybe John can explain how one should use the < code> elements in Active Forum.  It sure would be nice to see the rules inthe context of how they were used without having them in attached text files, which currently seems the only reliable way.

Regards,

/DaveS



Ryno
New Member
Posts:38


Send PM:Send Private Message

--
13 Dec 2008 09:02 PM
Anybody know of a rule that would add "nofollow" tags to all hyperlinks?

Also, if there was a way to make the rule above I would have to exclude any page I didn't want that done to in the exclusions section (not within the rule logic itself). Is that correct?


Ryan Moore
New Member
Posts:23


Send PM:Send Private Message

--
18 Dec 2008 05:22 PM
Posted By John Mitchell on 06/30/2007 10:29 PM

Good idea.&#160; Here's another pretty good one.

This one grabs everthing up to the /tabid and moves it to the end, so that parent/child pages are handled better.

SearchFor:&#160;&#160;&#160;&#160;&#160;&#160; (http[s]?://[^/]+)(/[^"]+)(/(?=tabid)[^"]+)/Default\.aspx(?!\?)

ReplaceWith:&#160;&#160;&#160; $1$3$2.aspx

The rule makes this:
http://www.mysite.com/Hollywood_FX/Free_HFX/tabid/56/Default.aspx

Become this:
http://www.mysite.com/tabid/56/Hollywood_FX/Free_HFX.aspx

&#160;

This rule does not seem to work for me. I'm able to make the "Url - Home" rule work for various pages (modified accordingly)&#160;when I set it up at the portal level. But if I could make the rule above work then I wouldn't have to create a rule for every page.

On a second point, could this rule be modified so that the result works like the "Url - Home" rule, i.e., so that it does not display the "/tabid/xx/" part of the Url?

&#160;

&#160;

&#160;



&#160;



Rob vd Gaag
New Member
Posts:1


Send PM:Send Private Message

--
02 Feb 2009 01:16 PM

Correct me if I'm wrong. My users typically type in their e-mail address having IE turn it in a mailto link. Cloaking this is ok of course, but the e-mail address is still visible in the HTML because IE made the link description the same as the e-mail address. I'm not that familair with regular expressions, but is it possible to change the link description to something like 'e-mail' when the user did not change the link description him/her self?



Yehuda Tiram
New Member
Posts:1


Send PM:Send Private Message

--
29 Jul 2009 03:08 PM
Hi,
I have 2 domains pointing to the same site:
www.atarimtr.co.il
and
www.atarimtr.com


I tried to use the following rule in order to have:
atarimtr.co.il
www.atarimtr.com
atarimtr.com

redirected to:
www.atarimtr.co.il

Here is the code I used:


square brackets removed
 
PB: IF(  Capture("http://www.snapsis.com/Support/tabid/601/aff/9/aft/6190/afv/topic/afpg/2/Default.aspx","http://([^/]+)[/]?(.*)" )  != "www.atarimtr.co.il"  ) {

     
     
     [PB: Response.End() 

} else{

/title>

}]



I get the following error in Firefox:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I tried removing the portal aliases and leave only
www.atarimtr.co.il
but it did not work.
(If you try them now they will not take you to the site)
Any idea what is the fault here?

Thanks,
Yehuda



liorlustig
New Member
Posts:7


Send PM:Send Private Message

--
20 Aug 2009 08:23 PM
A rule for CDN - Content Delivery Network

Hi
I need to make some rule that when even it find a link to an image, for example .jpg, ii will take it from another domain, which means if my link is http://www.domain1.com/myimage.jpg, It wil simply change the domain to for example:
http://cdn.cdnnetwork/myimage.jpg.
Everything after the domain name is the same.
Is that possible?
Thanks
Lior


llong
Posts:113


Send PM:Send Private Message

--
21 Aug 2009 02:26 AM
liorlustig
I would create a special folder for the CDN content so you don't serve all images through the service. Do something like domain.com/CDNcontent/ then you can use it for all sorts of documents. Make sure to use clean root relative paths and match scr="/CNDcontent/. Rewrite to scr="http://your CND domain/CNDcontent/. Same should work with Href.


Patrick Coleman
Posts:89


Send PM:Send Private Message

--
07 Sep 2009 11:28 AM
Here is one that John helped me to create for using a content delivery network:

This can be used as a global if all your sites are using the same content delivery network and will redirect small content from your domain to your cdn domain - we use a cname cdn for ours:

<rule><ruleName>small-file-cdn</ruleName>
<searchFor><![CDATA[<((img|link|script)[^>]+(href|src)=")/]]></searchFor>
<replaceWith><![CDATA[<$1http://cdn.domainname.com/]]></replaceWith></rule>

As we use a separate CDN for large file types we use this for audio and video again we use the cname videos for our large file CDN:

<rule><ruleName>large-file-cdn</ruleName>
<searchFor><![CDATA[<((audio|video)[^>]+(href|src)=")/]]></searchFor>
<replaceWith><![CDATA[<$1http://videos.domainname.com/]]></replaceWith>
</rule>

If you use a separate CDN for each portal (we cdn.domainname.com and videos.domainname.com for each domain) then would set these up as portal rules as follows:

Find: <((img|link|script)[^>]+(href|src)=")/
Replace: <$1http://cdn.domainname.com/

and

Find: <((audio|video)[^>]+(href|src)=")/
Replace: <$1http://videos.domainname.com/

Cheers,
Pat


Changing the world one spine at a time - Chiropractic Websites
liorlustig
New Member
Posts:7


Send PM:Send Private Message

--
08 Sep 2009 07:16 PM
Hi
How do I do a simple rewrite with the community edition.
For example replacing all words in the source: "Nike Shoes"
To "Wedding Dress"
Is there also a way to replace text that is more then one line?

Thanks
Lior


liorlustig
New Member
Posts:7


Send PM:Send Private Message

--
08 Sep 2009 07:18 PM
I also had a problem that when using the jpg and gif processing threw IIS, images that had the & sign in them stopped showing.
for example: returns&warranty.gif
Is there a way to fix that? I can create a new file named:returns_warranty.gif
But this image is showing on many pages so its not possible to change it by hand. Is it possible to create a replacement rule from:
returns&warranty.gif
to
returns_warranty.gif
So it will be fixed?


liorlustig
New Member
Posts:7


Send PM:Send Private Message

--
08 Sep 2009 07:19 PM
I tried:
<rule>
<ruleName>Catalook1</ruleName>
<searchFor>Nike Shoes</searchFor>
<replaceWith>Wedding Dress</replaceWith>
</rule>

But it doesnt work


jameskuk
New Member
Posts:1


Send PM:Send Private Message

--
06 Nov 2009 02:22 PM
Hi
I tried to use this rule but it didnt work for me with Catalook.
The link to my products is:
http://www.mysite.com/Start/tabid/202/CategoryID/784/List/1/Level/a/ProductID/1899/Language/jp-JP/Default.aspx
What rules should I use to get these links to be friendly links?
Thanks
James


Please Register to participate.
Page 2 of 2 << < 12


Active Forums 4.1
     
      
Powered by: Snapsis Software