Check if Joomla installed in subdirectory - joomla

I need to find out if Joomla has subdirectory or it's on the main domain area, i.e domain.com or domain.com/livesite
Is there a way to find this out ?

Related

transferring joomla from subdomain to main domain

i have my my website like abc.com/dev now i want to transfer it to abc.com,
what minimal changes should i do to make it work .
My website is in joomla is there way that i just move folder to main folder and add db setting.
Please guide i am new to joomla
Just Drag and drop your folders from your subdomain folder to root folder through FTP.
Then only changes you need to do is in your 'configuration.php' file located at the root folder. If your DB is not changed then do not change any of its setting. Just change the path of 'LOGS and TMP' folders in config file to the root path that are :
$log_path, $tmp_path
And I hope your site will work perfectly as it was working before.

How to publish a directory from Joomla

I have a website created using joomla 3.0 (bitnami on amazon aws). I want to publish few files (html) from the website and was wondering how to do it ? Ideally I want to keep those htmls under /opt/bitnami/apps/joomla/htdocs/storage/matrix.html and then access it from my site using url : /storage/matrix.html
Any clues ?
I found the solution myself after trying out a few things. What I did was created a new directory called storage under htdocs (of my joomla installation) and then also copied a htaccess.txt file inside it (from another public folder). And that's it ! This directory is now public and I can access it like I wanted !

How to use symlinks in magento?

How to use symlinks in magento?
This is the scenario:
I have a subdomain store.example.com (say), it has 4 websites (de,fr,au,af).
I want each of these websites to link to store.de.example.com , store.fr.example.com, store.au.example.com and store.af.example.com respectively.
So that I can run each of these magento websites individually.
My usual approach for setting up Magento multisite environment.
Here are few additional goals that I’d like to achieve when doing this: core code out of the way , clean public folders, packed for easier deployment and testing.
magento_base/
htdocs/
htdocs/website_01/
htdocs/website_01/index.php
htdocs/website_01/.htaccess <-- symlink
htdocs/website_01/js/ <--symlink
htdocs/website_01/skin/ <--symlink
htdocs/website_01/media/ <--symlink
htdocs/website_01/errors/ <--symlink
htdocs/website_01/downloader/ <--symlink
htdocs/website_02/
Set up your magento isntallation to magento_base folder and right next to it (or any place you need or your virtual-host makes them) you’d make a folder for each of your subdomain, website (dependent of your multisite goals). Next we symlink public parts of magento to this folder and make a copy of index.php and change path for including Mage.php and set your website or store code at the end of it.
*note that if you have few sites then you can make htdocs folder inside your magento_base for easier deployment and map your domains inside that folder*
Next step is to point your domain, subdomain and map it to right website folder and you are good to go:
You get your codebase out of the public folder by pointing domains to public folder and symlinking Magento’s few public needs
Upgrades won’t mess with your symlinked files and you don’t have to change server configuration files
If you use git then you can have those symlinks pointed to stage, live branch checkouts and just push your changes to production or stage env’s
You can test inside magento base folder on your test-server without conflicting your production settings and setup different sites (sites can be accessed by site or store code)
client is pointed to public folder to upload his other stuff , campaigns, blogs whatever and that won’t be mixing with magento_base folder and you can make rules to include/exclude from your deployment procedure. No more crap inside.

CodeIgniter How to create Multiple Site with One CMS

I want to create a blog site with only one CMS. This CMS will be in different domain.
For example: mycms.com
Then my blog sites are also in different domains.
For example: website1.com, website2.com, website3.com
They will all use mycms.com as their admin
*Images will be uploaded in mycms.com/images/ so all the 3 websites will get the images from this directory
If images are loaded on website1.com from the main database, they should be displayed as if they're from website1.com. So for example website1.com/images/cat.jpg instead of mycms.com/images/cat.jpg
How will I build this using codeigniter?
You can use the same CodeIgniter /System and /Application folders for all the websites if you like; just make sure all the index.php files are setup to use those same folders for $system_path and $application_folder respectively. Note that these sites also need to reside on the same server.
You can serve up different content by checking $_SERVER['HTTP_HOST'] for the domain the request came from.
As for htaccess you should be able to use %{HTTP_HOST}/$1 or %{HTTP_HOST}$1 (depending on server config) to make the rewrite rule dynamic.
I am actually building a similar project right now using CodeIgniter but there are also several other projects available like halogy, codefight, pyro (with an extension), and many others.
CodeIgniter has a System and an Application folder. You could have one global system folder and then one application folder for each of your subdomains, or you could have one application folder and just make your subdomian folders parallel with your www folder.

Pushing/Migrating your local Drupal site to a live-site

I have installed drupal on my localmachine(ubuntu, Xampp), at localhost.
Path and Pathauto modules are active (a module to produce friendly URLs).
Migrating/Pushing my local install to the www.mysite.com
Exported SQL from phpMyadmin(localhost).
Made a new DB at live site (I think a different name from the localhost-DB does not create any problem).
Imported SQL into phpMyadmin, (mysite).
Changed the username-password-DBname in the sites/default/settings.php in drupal folder.
Now, uploaded the drupal folder and all its content into the /www of the "mysite.com".
Visited the URL www.mysite.com, site looks same as on my localhost, good.
But --
I made a tryPage on my
localhost/drupal, for which
pathauto(cleanURL) recommended the
URL "content/trypage" which i
explicitly changed to "trypage", so
that absolute link to the page is
"localhost/drupal/trypage" and not
"localhost/drupal/content/trypage".
Now When i click the trypage link on the mysite,
it open's it in-reference to my
localhost, my local-pages are
opened. That is, when I click
newpage on the mysite.com, the URL
requested is
"localhost/drupal/newpage" and not
"www.mysite.com/newpage".
Do you think it is coz of the SEO
friendly URL generation issue, the
Pathauto module.
Anyways how do i solve this
If I make my "localhost/drupal" to open from same URL (mysite.com), i dont know how
to do that exactly, i think by configuring
vhosts. But if i do that, then the URL
www.mysite.com where will it take
me, local or online.
Now If i add new modules, new content, new pages, and new books on my localhost site, and wish to update mysite.com, do i have to redo SQL export/import everytime, and use a software like rsync/sitecopy(), to upload the folders on the live site. How do i solve this.
This is an old question, but here are some thoughts.
Links generated by Drupal (e.g. menu links, links within the admin area, breadcrumbs, etc.) should always use the domain of the currently requested site. URLs within Drupal are handled by the "router", which stores all paths within the database in a relative format.
That said, unless you're specifying the site URL in settings.php (the $base_url variable) or are linking to pages using fully qualified URLs, this shouldn't be a problem. Linking to different nodes from other nodes can be handled with a variety of modules. Pathologic is a good choice, or Path Filter.
Moving Drupal sites from development to staging to production is still a common problem for which there is no definitive solution. This question was asked previously here.

Resources