As some of you may know, Wordpress has an options in settings to allow site installation in a subdirectory, while having the site URL be the main domain. It was something like "Site url" and "Wordpress url". I'm looking for something like this in Joomla. I know there is no inbuilt option for it, but I'd rather not have to move all the files if possible. And please, explain it to me like to a five year old, just in case :)
相关问题
- How can I change the Joomla administrator URL By P
- Joomla >1.7 hide log messages from browser
- Joomla 2.5 creating component and saving data
- Joomla - how to hightlight the menu item for activ
- Understanding htaccess Filesmatch code
相关文章
- Fatal error: Call to a member function getKeyName(
- How to import Joomla to Azure?
- How to center images in a responsive grid with CSS
- offcanvas menu link broken
- access joomla session in php - codeigniter
- How to get article intro Image by Id Joomla 3
- Internal article links in Joomla
- Java: list files recursively in subdirectories wit
To move the whole joomla installation to a subfolder on the server (http://example.com/subdir), but still access it from the root (http://example.com) I did the following:
(The code is modified from this excellent answer)
Modify the default joomla .htaccess-file, now in the /subdir-folder, to include a RewriteBase:
After these modifications it seems everything works the way it should.
You can override the file /includes/defines.php in your joomla installation. Copy this file to the root folder of your installation, and then change all folder names to how you like your setup.
In /index.php you see how it first checks if /defines.php exists. Then it goes on to load /includes/defines.php if _JDEFINES is not defined. So be sure to include
in your overridden /defines.php-file. Good luck :)
Below is how index.php loads folder definitions:
I see now that you are able to override folder locations in /administrator in a similar matter, copy /administrator/includes/defines.php to /administrator and override folders here.
I have used an extension called Virtual Domains for this before. According to them it provides
. Which I have made use of previously and it works well
I first tried the accepted answer. However, that answer also redirects existing files and folders to the new subdir.
For this reason I used:
instead.
I'm aware that this is not the best solution as it doesn't hide the sub directory properly. However, it allows to keep the existing code on that site working.