This appear to become an frequently question online, but many site's have old solutions as well as way outdated techniques.

I am using .htaccess to rewrite Web addresses to have an Search engine optimization website.

Essentially, the header links go such as this:

    <ul id="navigation">
        <li><a href="index/" title="Home">Home</a></li>
        <li><a href="softwares/" title="Softwares">Softwares</a></li>
        <li><a href="about/" title="About">About</a></li>
        <li><a href="contact/" title="Contact">Contact</a></li>
    </ul>

Therefore the full url could be: http://localhost.com/softwares/ or http://localhost.com/about/ and etc...

RewriteRule ^([^/]+)/$ $1.php [NC]

Now, this works best for when routing the /$/ towards the file, however, all images, href, and etc aren't effective / show. (since the url is technically pointing to some sub directory).

My question: What must we write or what must we do in order to fix individuals images, css, web addresses, and etc...

The “problem” here is the fact that you’re using relative pathways which are resolved in a different way on base pathways with multiple segments:

 base path  | reference   | resolved path
------------+-------------+--------------------
 /          | img/foo.png | /img/foo.png
 /index.php | img/foo.png | /img/foo.png
 /index/    | img/foo.png | /index/img/foo.png

One simle method to solve this really is using absolute pathways rather:

 base path  | reference    | resolved path
------------+--------------+---------------
 /          | /img/foo.png | /img/foo.png
 /index.php | /img/foo.png | /img/foo.png
 /index/    | /img/foo.png | /img/foo.png

You may also alter the base URL while using [cde] element. But observe that this can affect all relative Web addresses.