MyWebsiteDesigner.com.au
 Posts:2
Send PM:
 | | 30 Jun 2007 03:14 PM | | We need a "sticky post" that every one can post rules that they are using in so I will start one here :) As I add a rule to my websites I will post the details to share with everyone else!! |
| | |
|
|
|
MyWebsiteDesigner.com.au
 Posts:2
Send PM:
 | |
John Mitchell
 Posts:4350
Administrator Send PM:
 | |
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 04 Jul 2007 05:55 PM | | Today I spent a little time doing SEO on my DotNetNuke Support Forums. Here are some rules that I used: This one is the main list for all the forums. It captures the name of the forum and uses it as the name of the page.
Search For: (tabid/\d+/view/topics/forumid/\d+/)Default.aspx">([^<]+)</a>
Replace With: $1DNN-$2.aspx">$2</a> This one targets a specific forum ( #12 ) which is my Tip And Tricks Forum. By using this rule, it chages all the links for the posts so that the page name includes my Tips and Tricks keywords. It also adds the PostID to the page name so that each page has it's own unique name.
Search For: (/tabid/\d+/forumid/12/postid/(\d+)/view/topic/)Default.aspx
Replace With: $1DNN-Tips-And-Tricks-$2.aspx
See them in action by browsing the SnapsisDotNetNuke Support Forums |
| | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 04 Jul 2007 06:31 PM | | Here is one for a Catalook store Product Link. This rule captures the text from the link and replaces the name of the page (default.aspx) with the Product Name.
Search For:(tabid/\d+.*?/ProductID/\d+/)Default.aspx">([^<]+)</a>
Replace With: $1$2.aspx">$2</a>
Depending on the name of the product, the above rule can make some ugly page names.
You may just want to target specific product links and then define the page name specifically like this:
Search For: (tabid/\d+.*?/ProductID/(13|14)/)Default.aspx">([^<]+)</a>
Replace With: $1DotNetNuke-CSS-SEO-Menu-$2.aspx">$3</a> |
| | |
|
Nelson Fernandez
 Posts:82
Send PM:
 | | 09 Aug 2007 02:39 PM | | Heres a simple one I use to add Google analytics to my pages. First create a file to store your analytics script and save it somewhere . ---------Sample File: C:\Site\PreBodyEnd.txt -------- [your script code as generated by google] -------------------------------- next create a rule to replace the body tag with the file and the body tag:
Seachfor: </body>
ReplaceWith: </body> Viola! I actually have several scripts I use for tracking my website visitors that need to load just before the closing body tag, so I can put more mode in the txt file as needed. This same thing can be done for stuff you need to put in the head area as well, just replace the closing head tag with a different file. |
| | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 09 Aug 2007 02:58 PM | | Nice one! I modified your post just a little so the html tags would show up. |
| | |
|
Ari Doucette
 Posts:57
Send PM:
 | | 10 Oct 2007 06:14 PM | | Here's one for putting the title of a DNN Wiki entry into the page title: (I think this requires the paid PageBlaster) I couldn't spend any more time trying to figure out how to get html code to appear here, so I just attached it as an image file. |
Attachment: pb0.gif
| | |
|
DavidWSnow Posts:218
Send PM:
 | | 01 Feb 2008 03:20 PM | | SEO RULES
---------
I had a problem where I had one DNN page with a query string that had data for 100+ Businesses.
Google was very happy indexing 100+ pages with the same title and description, and this did little
to get these businesses data into Google. JavaScript could change the title for the user, but not
for Google. PageBlaster to the rescue. You could also do this for Keywords. XHTML RULES
-----------
I have an xhtml (all css) skin and container. I wanted as many pages to be xhtml compliant as reasonable possible. Page by Page I placed PageBlaster on the page and added “Page Rule”s as required. When possible I used John's xhtml rules. While they all worked for John on his home page, some failed badly when I turned them loose wholesale as portal rules. "lower attr" is one that I never got to work in my environment. Also there were things that needed to be deleted, especially in DNN 4.8.0 where the search box as an "autocomplete=off" that is W3C non-compliant.
In addition to John's "lower tag", "close tags", "hr-br", "nowrap", "remove type", "style type", "style script", "img", "img alt"
I have added several more and tweeked a couple of his. The rules are in the attached file. The site is www.AgingSafely.com if you want to look at it. Since I did this work I have switched from DNN Forums to Active Forums and started to use Ventrain's News Article as a blog module. I haven't attacked either of these for xhtml yet. Regards, DaveS |
Attachment: 121204080371.txt
| | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 01 Feb 2008 04:27 PM | | Nice work Dave. As you point out, having a set of rules for Xhtml that works on all pages is pretty hard to accomplish. Especially if you don't want to waste too much processing on "what ifs".
Thanks for sharing. This will help us all get that much closer to Xhtml Nirvana.
|
| | |
|
llong Posts:113
Send PM:
 | | 04 Apr 2008 02:53 PM | | I use this for conditional IE only styling.
I have modified Default.aspx with a comment " < !--head--> " in the head section.
Then in PB I have added a rule to replace the comment with (modified to show here): < !--[if lte IE 6]> < link href="/Portals/0/Skins/myskin/skin-ie6.css" rel="stylesheet" media="screen" type="text/css" /> < ![endif]--> Now all versions of IE 'less then or equal' to 6 will get the additional style sheet.
You could search for < /head> but the comment method is safer should you make a mistake. EDIT You could extend this for other styles sheets that target handhelds: < link rel="stylesheet" media="handheld" type="text/css" href="/portals/0/handheld.css" /> target print layouts: < link rel="stylesheet" media="print" type="text/css" href="/portals/0/print.css /> |
| | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 14 Apr 2008 05:31 PM | | This one took a little while to figure out so I thought I would save it here to refer back to. The following rule can be used to make sure that all domains that may be pointed at your website will get a 301 redirect back to the main domain that you want to use. Even if you only have one domain this will insure that yourdomain.com will always go to www.yourdomain.com Search For: /title> Replace - Respond With: [PB: IF( Capture("[PB:Request.Url.Original]","http://([^/]+)[/]?(.*)" ) != "www.yourdomain.com" ) {
[PB: Response.Status("301 Moved Permanently") ]
[PB:Response.AddHeader("Location","http://www.yourdomain.com/$2")]
[PB: Response.End() ]
} else{
/title>
}] |
| | |
|
OM
 Posts:42
Send PM:
 | | 26 Apr 2008 06:44 PM | | Posted By DavidWSnow on 02/01/2008 3:20 PM
XHTML RULES
-----------
In addition to John's "lower tag", "close tags", "hr-br", "nowrap", "remove type", "style type", "style script", "img", "img alt"
I have added several more and tweeked a couple of his.
---------- Where is this list of rules? I'm in the process of fixing xhtml validation. Have gone from 400 to 80 errors already.
I am using a module that outputs links with "&" not url encoded as "&" - what rule can I use to replace "&", without also replacing any "&"?
OM ps how do you use quoting on this forum, my message always ends up in the quote, not after it...
pps .. above its should say that & is not encoded as & amp ; |
| | |
|
Snapsis Staff Posts:239
Send PM:
 | | 26 Apr 2008 07:34 PM | | In the DesktopModules/Snapsis/PageBlaster/Config/SavedRules folder is a saved rules file named PageBlaster.SavedRules.Xhtml.config You can rename that to PageBlaster.SavedRules.config, or open it up and carefully add the nodes to your current saved rules. Dave also attached a revised list of rules earlier in this thread I believe. To get all ampersands that are not already the & amp; entity you can use this rule: SearchFor: &(?!.{2,5};)
Replace With: &
I'm not sure how to make that Quote thing work correctly. It must be a bug because of the editor. |
| | |
|
OM
 Posts:42
Send PM:
 | | 26 Apr 2008 08:24 PM | | Thanks, that looks like it is working |
| | |
|
goBlanks
 Posts:13
Send PM:
 | | 27 Apr 2008 01:20 PM | | Posted By John Mitchell on 07/04/2007 5:55 PM Search For: (tabid/\d+/view/topics/forumid/\d+/)Default.aspx">([^<]+)a>
Replace With: $1DNN-$2.aspx">$2a> Search For: (/tabid/\d+/forumid/12/postid/(\d+)/view/topic/)Default.aspx
Replace With: $1DNN-Tips-And-Tricks-$2.aspx See them in action by browsing the SnapsisDotNetNuke Support Forums John, I don't seem to be getting these to work in PB or DNN friendly urls. Have you updated your rules since releases? I'm using PB 3.2 and DNN 4.8.2 with friendly url's turned on. Care to share your rules again? |
| | My DNN Projects: NortheastOK.com, goBlanks.com | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 27 Apr 2008 04:50 PM | | Those are the rules I am currently using. It looks like the forum might have mangled the rule a little though. I have attached a text version to this post. |
Attachment: 142750489771.txt
| | |
|
OM
 Posts:42
Send PM:
 | | 27 Apr 2008 06:25 PM | | Thanks, &(?!.{2,5};) looks good.
Btw, while testing xhtml validation, the validator at validator.w3.org often does its own client side caching, so it will not always validate the latest source. The way to get around this is to validate the url with a different param each time, eg
mysite.com/default.aspx?x=1
mysite.com/default.aspx?x=2
etc (the param does not need to be valid. the validator will get a fresh copy of the source each time)
OM |
| | |
|
John Mitchell
 Posts:4350
Administrator Send PM:
 | | 28 Apr 2008 07:26 AM | | That's a good idea. I usually just do a hard refresh to clear the cache on the page that is being validated before I try to validate it again. |
| | |
|
OM
 Posts:42
Send PM:
 | | 30 Apr 2008 11:26 PM | | I've had problems with the validator - I use ctl-f5 repeatedly and it still validates a previous version of the page. So I think it has its own client side cache - hence the method used above.
OM
|
| | |
|