web developers ලා seo අයියලා එන්ඩෝ.

crhunter

Active member
  • Aug 21, 2016
    614
    118
    43
    web developers ලා seo අයියලා එන්ඩෝ.

    මම මගේ site එකේ URL Rewrite කරා.,

    මෙන්න මේ විදිහට තමා වෙනස් කරේ.
    Code:
    # Rewrite for jobsdetails.php?post_id=24
    RewriteRule ^latest-middle-east-jobs/([0-9a-zA-Z_-]+)$ jobsdetails.php?post_id=$1 [NC,L]
    මේකටනම් 0-9 විතරකුත් ඇති.

    කරලා test කරලා බලද්දී css , imgs මොකුත් ගන් නෑ ..,
    පස්සේ මීටර් උනේ path එක වෙනස් වෙනවානේ කියලා .,
    bootstrap එකේ විතරක් ඒ විදිහට path එක වෙනස් කරලා test කරා එලකිරියට වැඩ.
    ඒ උනාට වැඩේ කියන්නේ ඒ විදිහට කීයක කියලා වෙනස් කරන්නද ..,
    navigation වල ඉදන් හැම ලින්ක් එකක්ම වෙනස් වෙලා තියෙන්නේ.,:confused::confused:

    absolute link සීන් එකත් try කරා.,
    අනේ මන්ද එහෙම දුන්නම css ගන්නේ නෑ.,(මන් කරන විදිහේ අවුලක් ද මන්ද.)

    උබල කොහොමද බන් කරන්නේ?
    උදව් දෙන්ඩෝ ., පින් සිද්ද වෙනවා අඩේ සිරාවටම ,.. ;)
    රේප් නම් ලොවෙත් ., :yes::yes:
     
    Last edited:

    crhunter

    Active member
  • Aug 21, 2016
    614
    118
    43
    Uba script eka liyanakota hari nam absolute path eka wenama define karala hema internal assets walatama absolute path eka denna one.

    Ube relative path ekada deela tiyenne?

    adep relative path walin bn mn wada kare

    absolute path eka wenama define karanawa kiwwe?
    uba ee widihata karpu script ekak thiyenawanm daapnko poddak balnna .
    mata kiwwata metr un naa
     
    Last edited:

    Lakshan-Seram

    Well-known member
  • May 31, 2011
    24,739
    12,666
    113
    127.0.0.1:8080/Kandy
    adep relative path walin bn mn wada kare

    absolute path eka wenama define karanawa kiwwe?
    uba ee widihata karpu script ekak thiyenawanm daapnko poddak balnna .
    mata kiwwata metr un naa

    man nam karanne mehemai

    PHP:
    /*
     * Configuring file paths.
     */
    define('BASE_URL', 'http://localhost/esup.uod'); // Base URL of the site.
    define('BASE_DIR', dirname(dirname(__FILE__))); // Base directory of the site.
    define('ADMIN_URL', BASE_URL.'/admin'); // Base URL of the admin.
    define('ADMIN_DIR', BASE_DIR.'/admin'); // Base directory of the admin.
    define('TEMPLATE_DIR', BASE_DIR.'/template'); // Template directory of the theme.
    define('TEMPLATE_URL', BASE_URL.'/template'); // Template URL of the theme.
    define('ADMIN_TEMPLATE_DIR', ADMIN_DIR.'/template'); // Template directory of the admin.
    define('ADMIN_TEMPLATE_URL', ADMIN_URL.'/template'); // Template URL of the admin.
    define('IMG_DIR', BASE_DIR. '/images'); // Images directory.
    define('IMG_URL', BASE_URL. '/images'); // Images URL.
    define('AVATAR_URL', BASE_URL. '/user_files/avatars'); // User avatar URL.


    HTML:
    <?php
    /*
     * Author: xxxxxxxxxxxxxxxxxx (www.xxxxxxxxxxxxxxxxxx.com).
     * Header template part.
     */
    defined('_VALID') or die('Restricted Access!'); // Preventing direct access of the file for security.
    ?>
    <!DOCTYPE HTML>
    <html<?php if((THIS_PAGE=='LOGIN')) echo ' class="narrowed"'; ?>>
    <head>
    <meta charset="utf-8">
    <title><?= $config['title'] ?></title>
    <meta name="keywords" content="<?= $config['keywords'] ?>">
    <meta name="description" content="<?= $config['description'] ?>">
    <link rel="shortcut icon" href="<?= BASE_URL ?>/favicon.ico?v=2" type="image/x-icon">
    <link rel="icon" href="<?= BASE_URL ?>/favicon.ico?v=2" type="image/x-icon">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="<?= TEMPLATE_URL ?>/css/styles.css" media="screen, projection">
    <link rel="stylesheet" type="text/css" href="<?= TEMPLATE_URL ?>/css/jquery.datetimepicker.css" media="screen, projection">
    <script type="text/javascript" src="<?= TEMPLATE_URL ?>/js/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="<?= TEMPLATE_URL ?>/js/jquery.datetimepicker.js"></script>
    <script type="text/javascript">
        var base_url = '<?= BASE_URL ?>'; // Base URL of the site for global access. 
    </script>
    </head>
     

    crhunter

    Active member
  • Aug 21, 2016
    614
    118
    43
    man nam karanne mehemai

    PHP:
    /*
     * Configuring file paths.
     */
    define('BASE_URL', 'http://localhost/esup.uod'); // Base URL of the site.
    define('BASE_DIR', dirname(dirname(__FILE__))); // Base directory of the site.
    define('ADMIN_URL', BASE_URL.'/admin'); // Base URL of the admin.
    define('ADMIN_DIR', BASE_DIR.'/admin'); // Base directory of the admin.
    define('TEMPLATE_DIR', BASE_DIR.'/template'); // Template directory of the theme.
    define('TEMPLATE_URL', BASE_URL.'/template'); // Template URL of the theme.
    define('ADMIN_TEMPLATE_DIR', ADMIN_DIR.'/template'); // Template directory of the admin.
    define('ADMIN_TEMPLATE_URL', ADMIN_URL.'/template'); // Template URL of the admin.
    define('IMG_DIR', BASE_DIR. '/images'); // Images directory.
    define('IMG_URL', BASE_URL. '/images'); // Images URL.
    define('AVATAR_URL', BASE_URL. '/user_files/avatars'); // User avatar URL.
    මේ ටික .htaccess ekeda bn gahala thiyenne.,
    ado ela ela mehema dunnaman aye ginnakma naa .,,
    monaa wenas unath base eke idan neh ganne


    matath hambunaa system ekak.,
    PHP:
    RedirectMatch permanent ^/latest-middle-east-jobs/((css|js|fonts|images|)/.*)  /$1
    eekath awlkma naa ithin.,
    habyi rewrite karana serotama gahnna one :D

    ade thnx bn.,
    ube system eka aniwa try karlaa balnawa
    thaama 1st year patn gatta withryi bn.,
    languages karddi full idea ekak ei

    එහෙන් මෙහෙන් අහුලා ගත්ත කෑලි ටිකකින් ගේම ගහන්නේ., :)
     

    crhunter

    Active member
  • Aug 21, 2016
    614
    118
    43
    You must spread some Reputation around before giving it to Lakshan-Seram again.

    lagadi rep+ deela thiyenawa wage :D