I installed joomla in a subdirectory of my site OVH.
This is the default option ofOVH when installing the module joomla.
This is what I would have done also manually, so as to separate Joomla the rest of the installed applications (mediawiki ...).

I also ticked the box to have the use of the "SEO"

SEO Parameters



Then I made the necessary changes in the .htaccess file of the joomla directory.
However, it can be disturbing to see the name of the directory appear in the URL.
I searched and found a method.
Here are my changes to the file .htaccess from the root of my site:

.htaccess

						
# Change http://yoursite.com to http://www.yoursite.com (Optional)
RewriteCond %{HTTP_HOST} ^jltryoen.fr$
RewriteRule ^/?(.*)$ http://www.jltryoen.fr/$1 [R=301,L]
# Exclude any subdirectories in the site
# root that should NOT be re-directed to joomla
RewriteCond %{REQUEST_URI} !^/joomla
RewriteCond %{REQUEST_URI} !^/MediaWiki
RewriteCond %{REQUEST_URI} !^/wiki
RewriteCond %{REQUEST_URI} !^/piwik
RewriteCond %{REQUEST_URI} !^/dump_mysql
RewriteCond %{REQUEST_URI} !^/phpMyAdmin
RewriteRule ^(.*)$ joomla/$1 [L]
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?jltryoen.fr$
RewriteRule ^(/)?$ joomla/index.php [L]

My installation directory is joomla.
I took the opportunity to redirect the url without the www.
The main lines are

.htaccess

RewriteCond %{HTTP_HOST} ^(www.)?jltryoen.fr$
RewriteRule ^(/)?$ joomla/index.php [L]

I also modified the file

joomla/configuration.php

public $live_site = http://www.jltryoen.fr';