Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: HowTo: Smart URLs and other SEO configurations

Started: August 19, 2009, 11:35 PM  ⋅  Zone: Public Forums  ⋅  Category: Install & Modification  ⋅  Posts: 4  ⋅  Views 611
Started by: Markus  ⋅  Description: No description.
Post #1
Member: Markus  ⋅  Date: August 19, 2009, 11:35 PM  ⋅ Subject: "HowTo: Smart URLs and other SEO configurations"

iWiccle supports URL rewriting, or Smart URLs --- currently in directory style. A Smart URL looks like this: http://www.wiccle.com/module/forums etc.). Static HTML page style (/directory/page.html) rewriting and other URL features will be available in the future. This is how you turn them on (along with a number of other SEO settings):



Just switch them on, and make sure your main .htaccess file has the folder name instead of / (slash) as the RewriteBase in case you installed into a folder. Smart URLs currently cover all of content that can be indexed by search engines, with the exception of search results --- and the last 5% is in works. Some AJAX features still don't do URL rewriting, and they don't need to for search engines, but they should for users --- so that's in works.


To turn Smart URLs off for your session (reset as you restart your browser), browse to yourdomain.com/index.php?smart_url=off. If you want to reactivate them, you can change the above to =on again.


Smart URLs are not switched on by default, because not everyone wants or needs them, because they can cause problems and error messages ifthe hosting company has some limits or special configurations in place, if the .htaccess file RewriteBase directive is wrong (if you install into a directory), and for servers that don't have Apache or the mod_rewrite module. And because an error message isn't a nice thing to see first thing after installation --- in case one or several of the above match!


The sitemap feature is still a bit on the raw side --- it only generates maps of (or "pages") of your Home module's layout sets, which would be "the pages" of your site if you built a custom website beside the modules. We'll expand it to cover everything soon enough, and make the sitemap exports customizable --- and in the meantime, RSS feeds already export everything from the modules. Laughing

Post #2
Member: john  ⋅  Date: August 20, 2009, 08:12 AM  ⋅ Subject: "(No title)"

Tried turning smart URLs on - just kept getting a bunch of error messages everywhere I clicked - looked everywhere for something I might have done wrong - nothing. I can only conclude it's the way my (hosted) server is configured.

My advice - keep smart URLs turned off - unless you absolutely need the feature and you are in control of your server's config.

Post #3
Member: Markus  ⋅  Date: August 20, 2009, 06:51 PM  ⋅ Subject: "(No title)"

Can you tell what kinds of errors you got? I'm sure it's nothing we couldn't fix. Smart URLs work fine on all the servers I've tested on --- except ISS, of course, because it's an Apache thing.


If you got 404 errors, it means the RewriteBase is probably set wrong in your .htaccess file.

Post #4
Member: Markus  ⋅  Date: August 21, 2010, 08:43 PM  ⋅ Subject: "Re: HowTo: Smart URLs and other SEO configurations"

Here are some further notes on URL rewriting, collected and recycled from e-mail support.

 

URL rewriting, default module and shorter URL form

By default, "Site" is the default module in iWiccle/WWB. As a module, Site mainly features as a container for all the custom pages you create, while the pages in other modules consist primarily of dynamic content posted by users.

While usually a URL like this — index.php?module=blogs&show=latest_posts — would become /blogs/page/latest_posts, the URL rewriting in our current builds shortens the URL for the defaul module to /page/latest_posts,  excluding the module name.This is to place your main content higher in the directory-style URL hierarchy.

URL conversion happens in the main .htaccess file. In this case, the rewrite rule reads as follows:

RewriteRule ^page/([a-z0-9_-]*)$ index.php?show=$1

This rule directs all requests to /page/your_page_name directly to your default module. This directive was missing from the .htaccess file in WWB 1.0.1 build — if you're experiencing error 404 messages with default module pages, add this line in.

If you don't want to use the shorter URL form (/page/pagename instead of /page/site/pagename) for your default module, you can open up class_global.php and head to function smart_urls(), and change line #1341:

$new_url = $vars['module'] != $core['init']['default_module'] ? "{$vars['module']}/page/{$vars['show']}" : "page/{$vars['show']}";

To the following:

$new_url = "{$vars['module']}/page/{$vars['show']}";

This will eliminate the feature and handle the URLs for all modules in the same way. (The shortened URL for default module has been made optional and under configuration for the next WWB build.)

 

When to turn URL rewriting on and off?

While developing your site, we recommend keeping URL rewriting off. You should only keep it on for live / release candidate sites, if you wish to have extra SEO boost from clean URLs. (The longer URLs are also indexed fine, however.)

The URL rewriter automatically converts all internal links matching the pattern, including those you may paste into your posts or add in through the builder. While developing, it's a good idea to also create internal links using the full URL form, and let the engine handle the rest when it's switched on. (The full URLs are much more informative for debugging and development purposes.)

 

TinyMCE, URL rewriting and image/link paths

Note that the TinyMCE editor included in the Builder doesn't like rewritten URLs. If you add images or links on a page with builder while accessing it using a /directory/style/url, TinyMCE will break them, as it modifies their source URLs without considering the base_href tag of the page — it assumes all links and images added are relative to this "virtual directory" (which of course doesn't exist).

If you have URL rewriting on and you want to edit links or images on pages, you can switch off URL rewriting temporarily, by starting at your editing with an URL such as this: http://www.wiccle.com/index.php?smart_url=off. This will turn it off for you only, and for your current session only.

The above note only concerns TinyMCE editor — you can use the rest of the builder as usual regardless of URL rewriting state. So far, I haven't found a configuration combo that would make TinyMCE behave properly and consistently in both URL modes.

 

TinyMCE, folder paths and moving sites

TinyMCE URL modifications need to be considered when moving sites. When an installation is in a folder, all images added with TinyMCE end up with the folder path included in the source URL. For example, adding in:

<img src="images/this.jpg" />

... would be changed by TinyMCE into:

<img src="/wicclefolder/images/this.jpg" />

Then, if you have been developing your site for example at http://localhost/wicclefolder or http://mydomain.com/wicclefolder, and now want to transfer it over to your main site URL, this will obviously lead to broken images.

The easiest way to address this is to just open up the .SQL database backup file you've taken in a code/plain text editor, and run a search/replace to replace all instances of ="/wicclefolder/ with just =" . This will make the paths work, wherever you install it.

Likewise, if you need to transfer or copy the installation your main site to a folder, you will need to replace all instances of ="/ with just =" to clean up the paths — otherwise you'll end up with broken images again. This should also be done to page layouts you may export and import from within WWB/iWiccle, if you're importing them to a different location.

 

Install & Modification

Add to Favorites
Public Forums
Category  ⋅  Deploying iWiccle and Wiccle into unique solutions that match your needs.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top