FAQ - How to use a .htaccess to set your own redirect on your instance |
|
DoliCloud is an open hosting solution. This means that, you can view, modify and download the program and data files. You can also edit files on your instances. Among this files, you can edit .htaccess files that are special files to allow you to define redirection directive on some Urls. Create localy a .htaccess fileIf you want to set a .htaccess file, the first step is to create it locally with any text editor (the name can't be modified). Fill its content with a content to define the redirections you want to set. For example, for a .htaccess file to store into the .well-known directory of your instance: RewriteEngine On RewriteEngine ^oauth-authorization-server(/.*)?$ /custom/mymodule/oauth/mymoduleoauth.php [PT,L] RewriteEngine ^openid-configuration(/.*)?$ /custom/mymodule/oauth/mymoduleopenid.php [PT,L] RewriteEngine ^oauth-protected-resource(/.*)?$ /custom/mymodule/oauth/mymoduleoauthprotectedresource.php [PT,L] Restriction on the use of .htaccess fileFor security and performance reason, usage of a .htaccess is enabled only on the directory .well-known
at the root of your instance. Transfer the .htaccess files on your instanceTo be able to transfer local files on your instance, you must use a file browser navigator that can connect to your instance using the SFTP protocol.
Any SFTP software can be used for that. Take a look at the FAQ on how to use a SFTP client software to access files of your instance.
FAQ written by the DoliCloud support team. |