Site icon Osclass Documentation & Knowledge Base

Perlmalinks

Friendly URLs configuration is one of most important factor for good SEO. Website without friendly URLs cannot rank well on search engines and will be on low positions.

What makes URL friendly?

There are certain characters you should avoid to have in your URLs, simply said “non-friendly URL characters”:

Recommended characters and practice:

Osclass permalinks configuration

When you enable friendly URLs, it’s require to create (or update) .htaccess file in Osclass installation root directory to contain following block:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Note that in some cases hosting add extra lines into .htaccess file. It’s still OK and requirement is only to have this block of code inside .htaccess. Note that mod_rewrite must be enabled on your server.

Fine-tuning permalinks

Some parts of permalinks cannot be translated and are static. For this reason it’s best to optimize your pemalinks for language you are focusing. If you have primary focus in multiple languages, it is recommend to have multiple Osclass instalaltions on it’s own country-specific domains or subdomains.

Listing URL

Default: {CATEGORIES}/{ITEM_TITLE}-i{ITEM_ID}

Supported keywords: {ITEM_ID},{CATEGORIES},{CATEGORY},{ITEM_TITLE},{ITEM_COUNTRY},{ITEM_COUNTRY_CODE},{ITEM_REGION},{ITEM_CITY},{ITEM_CITY_AREA},{ITEM_ZIP},{ITEM_CONTACT_NAME},{ITEM_CONTACT_EMAIL},{ITEM_CURRENCY_CODE},{ITEM_PUB_DATE}

{ITEM_ID} is required element. Never remove it from URL structure. Osclass cannot identify listing based on Item title as this may not be unique.

Static page URL

Default: {PAGE_SLUG}-p{PAGE_ID}

Supported keywords: {PAGE_ID}, {PAGE_SLUG}. When not using {PAGE_ID}, add prefix before page slug to keep static page URLs unique, example: help/{PAGE_SLUG}.

{PAGE_ID} is not required, however if you decide to remove {PAGE_ID} from URL structure, you must add some static prefix to URL structure so Osclass can differentiate it from home & search page URLs.

Examples:

Category page URL

Default: {CATEGORIES}

Supported keywords: {CATEGORY_ID},{CATEGORY_NAME},{CATEGORIES}

Other URL slugs

Make sure they are unique and never use same keyword/static slug for different pages!