What are SEO Friendly URLs

Search Engine Optimization Friendly URLs (or SEO FURLs) is an important SEO facility which allows you to increase the traffic to your website. A FURL looks like a web address that is easy for a user and a search engine crawler to decipher (in comparison with a dirty URL - http://www.example.com/cgi-bin/gen.pl?id=4&view=basic). In other words, most search engines won't index any pages that have a question mark or other character (like an ampersand or equals sign) in the URL. That is why it is important to consider using friendly URLs.

Module mode_rewite - is an Apache module that allows you to use regular expressions within an .htaccess file to rewrite your URLs.

RewriteEngine On - turns mod_rewrite on.

RewriteCond directive - defines conditions under which the rewriting should take place.

RewriteRule is the rewriting rule.

If the above Rewrite Rule does not work, then insert the below string in the .htaccess file:

ErrorDocument 404 /friendly_url.php

Note: Please, note that if ViArt Shop is running from some sub-folder, e.g. http://www.some-web-site.com/viart/ then the path to friendly_url.php script should contain /viart too, like:
RewriteRule . /viart/friendly_url.php [L]
or
ErrorDocument 404 /viart/friendly_url.php

2. When the file with the code is ready, save it and upload to the root folder of your shop.

3. Next step is to enable friendly URLs in the Admin panel. Go to Administration > System > System Global settings and find the settings as on the screenshot below:

Note: You can select to use different extensions for friendly URLs or use friendly URLs without extension (in the field 'Friendly Extension') and select a way to generate friendly URLs (as shown below):

Configuring friendly URLs for IIS

If you are using an IIS server, please follow the below instructions to enable friendly URLs:

Test that friendly URLs are configured correctly

To check whether you've set friendly URLs properly, please go to your site, press a category or a product. If you're correctly redirected to an appropriate category and/or product
and your URL is something like: www.yoursite.com/accessories (for a category) or www.yoursite.com/item1?category_id=1 (for a product) then your friendly URLs are set correctly. This is an example of using friendly URLs without extension.

If you receive an error page (i.e. 404 error), then it is recommended to check your .htaccess file for the correct rewrite mode code.

Working with custom friendly URLs

From version 3.4 ViArt php shopping cart is updated with a new feature - custom friendly URLs. Custom friendly URLs allow you to hide the type of script programming by removing the tell tale extension (such as .php) from your URLs for the default pages, like index.php, forum.php, etc.
Before starting to work with custom friendly URLs, ensure that your general friendly URLs are enabled as per instructions given above. The settings for Custom friendly URLs are located at Administration > CMS > Custom Friendly URLs.
Press the ‘Add New’ link to use custom fURL and enter a default script name in the field 'Script Name' and preferrable fURL in the field 'Friendly URL' (see the image below for a tip):

Press the ‘Add’ button and check your site. If you select to show friendly URLs with html extension in your Global Settings then when clicking the user_profile link you will see that the new URL will be user_login (as per your change). Quite easy:).

How to make a redirect to 404 custom page if friendly URLs are enabled

To make a redirect to a custom 404 page please do the following steps:

3. Access your site via any FTP client program and open your .htaccess file.

4. Insert the following string at the very beginning of the file:

ErrorDocument 404 /friendly_url.php

5. Save the changes and upload the updated file to the root folder of your shop.

6. Open the file 'friendly_url.php' (located in the root folder) and find such a code:

$is_friendly_url = false;

header("HTTP/1.0 404 Not Found");

header("Status: 404 Not Found");

exit;

7. Replace this code with the following:

header("HTTP/1.0 200 OK");

header("Status: 200 OK");

set_get_param("page", '404');

include_once('page.php');

return;

where '404' is the name of your custom page as created in your ViArt shop Admin console.

Note: If you do not want to create a custom 404 page in your Admin panel please add the following code to your 'friendly_url.php' file:

$echo_string = implode("",file('http://example.com/404_text.txt'));

echo $echo_string;

exit;

where '404_text.txt' is any empty text file saved in the root folder of your shop.

8. Save the changes in the 'friendly_url.php' file and upload the updated file to the root folder of your shop.

9. Open your browser and type something like: http://example.com/404, where example.com equals your actual site URL and 404 is the name of your custom 404 page. If you did everything correctly you will see your 404 custom page.

Importing friendly URLs

If you have multiple products and want to update products with unique friendly URLs, you can use ViArt Shop importing feature. Please, follow the below steps to get information on importing friendly URLs:

Firstly, select items you would like to update, press the 'Export filtered' button (below the products list in your Admin panel) and save a .csv file to your computer. When exporting items, ensure that you select an option 'Friendly URL'.

Further, open a .csv file, edit/add fURL in the column 'Friendly URL' and save the file.