Install modx in a subfolder - .htaccess

I like my webspace tidy :)
Therefore if my root-folder is html/ I would like to install modx (version 2.2) in the subdirectory html/modx/
For my website-visitors everything should be the same as if I would have installed modx in the root folder (html/).
I also don't want to do without friendly urls.
To make it even more difficult: I also really like the builtin modx file browser and I would love to use it for every file and folder in the document root (so every file inside html/* should be displayed).
(How) is this possible?
Additional question: if it is possible, is it better to reinstall modx in the subfolder or to move my installation to the new location (html/modx). As my installation is only a few days old, either option would be fine.

What version of MODx are you using?
Usually you would do an advanced installation (a separate version of MODx). You can move the existing MODx install to your sub-directory but you will need to update all of the config.core.php files and MODX_CORE_PATH constants to reflect this. You will also need to leave and update at least the index.php file in your web root directory. The config files that would need updating include:
config.inc.php
manager/config.inc.php
connectors/config.inc.php
core/config/config.inc.php
core/config/config.inc.php is the most important file and you will want to make sure ALL of the paths listed in there are correct.
The file browser will work fine providing you check all the URL and filesystem paths are correct in the Manager settings.

Change your .htaccess setting:
RewriteBase /subfoldername/
and install it as typically you do.

Related

Adding .htaccess to Cordova

I'd like to add a .htaccess to rewrite all paths to relative ones within Cordova.
At default, the .htaccess seems to be ignored. For Apache servers, you have to activate the support of these files.
Is there any equivalent option for Cordova, that works with every platform?

Magento Installation Without .htaccess

I'm making a new Magento Installation and like always, access magento.com to download the installations files.
For my surprise, theres no more .htaccess in the compress files O.o
Someone can tell why or give any tip?
It is always there, but it's a hidden file so just change the setting of the Files Manager or Finder to see it.

CakePHP htaccess files on 1und1 webserver

I'm trying to install my cakephp webapp on an 1und1 (German version of 1and1) webspace.
PHP and MySQL are installed and there seems to be a problem with my htaccess files as I can't open the css files for example on the webspace (404).
How does my .htaccess files have to look like?
The application is not installed in the root directory (that's unfortunately not possible), it's located under:
http://www.mysite.de/myfolder/system
http://www.mysite.de/myfolder/system/app
http://www.mysite.de/myfolder/system/app/webroot
I tried a lot of combinations. But none are working.
The last example I tried were the answers from this question: how to configure htaccess file for Cake 2.3.x on 1and1 shared hosting
Any recommondations?
Using the built in method for url-rewriting solved my problem: http://book.cakephp.org/2.0/en/development/configuration.html#core-configuration-baseurl

Timthumb and tmp folder

Recently a web space ran out of space. Now I found out that the tmp folder outside the home directory was full of these files: timthumb_tmpimg_00BZyC. Some of these files can't be opened. Why is timthumb storing files outside the home directory? The tmp folder is on the same level like dev, etc, proc, root, sys and so on.
Has the site a security problem? Are some settings incorrect?
Timthumb is used in version 2.8.5 by the Wordpress plugin vSlider. The site also uses Simple Post Thumbnails which uses Timthumb in v. 2.7. I replaced both with Timthumb 2.8.10.
Or does it have to do with temporary files created by timthumb, which were never deleted?
/tmp is intended to be world-writeable -- though if you try the following:
ls -l / | grep tmp
you'll see that it has the sticky (t) bit on, meaning that files created by a user can only be deleted by the same user or a superuser, to prevent different users from clobbering each other's temporary files. This is similar to the %SYSTEMDIR%\TEMP directory in Windows.
So it's not a security problem on the Linux side, though it could be a misconfiguration or a bug on the part of the WordPress plugin you're using. Is there an option limiting how many thumbnails it keeps?

Edit php.ini with .htaccess

I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I can update this via an .htaccess file on the server. So I created a s.htaccess on my machine as Windows doesn't like emptiness before the file extension. So I added the line php_flag enable_dl On to the file uploaded it and renamed the file to just .htaccess on the server. When I refresh the file is gone, when I keep it as s.htaccess it's fine but my php info still shows it as Off.
What n00b mistake am I making?
The documentation says that this can only be set in the php.ini (not in .htaccess). You can see this by looking at the table where it says "PHP_INI_SYSTEM", which means - "Entry can be set in php.ini or httpd.conf".
Unix way to hide files is prepending it with a dot. The file is there, but it's just hidden. Your ftp-software should have a setting for showing hidden files. IIRC you can rename the file to .htaccess through cmd in windows. The .htaccess only has effect in the current dir and sub directories. This might also be (because of security) one of those settings that is only setable through php.ini

Resources