Forgot password?
Welcome to our site!
Or Join with FTTF

Subdirectory installation problems


I installed LampCMS in a subdirectory. I put system files and folders such as !config.ini and lib in var/www/example/lampsite, and it's document root in var/www/example/lampsite/www

In !config.ini I have:

; base url of your main website. Required value!

in main site's virtual host, I set an alias to point to LampCMS site document root:

 Alias /lampsite /var/www/example/lampsite/www
<Directory /var/www/example/lampsite/www>
 Options Indexes FollowSymLinks MultiViews
 DirectoryIndex index.php
 AllowOverride all
 Order allow,deny
  allow from all

I created .htaccess file in LampCMS site root(www) and pasted the rules from RewriteRulex.txt, and removed # before RewriteEngine on

On the browser, I can access the site in subdirectory just fine, as in But when I navigate to any links, for example "Questions," I get 404 error: The requested URL /questions/ was not found on this server, and the destination URL is instead of the expected URL The behavior repeats for all links. I even tried to add RewriteBase /lampsite/ in .htaccess but still didn't work. How can I resolve this? I've been pulling hair all night. Please help!
Edited April 28, 2012 6:16 am AMT
asked April 28, 2012 at 4:51 AM

Not sure if this may help but in the Lampcms/lib/Object.php you can fine the line: const WWW_DIR = 'www'; and try to modify it to 'www/lampsite'
Apr 28 '12 at 7:56
@Dmitri Snytkine
That brings up this Fatal error: Class 'tplMain' not found in /var/www/example/lampsite/lib/Lampcms/WebPage.php on line 0
Apr 28 '12 at 12:45

5 Answers

Best answer
Actually I looked into this little further and realized that this is not an easy thing to do right now.
The rewrite rules have to be changed as well as a new functionality have to be added to site to automatically
prefix all generated urls with some type of constant like WWW_BASE_DIR

I will treat this as a feature request and will work on it.
answered April 28, 2012 at 11:57 AM
Thank you sir. I guess for now, I will install in a subdomain as is this support site
Apr 28 '12 at 13:00
Damn, I still can't respond to a comment and have to make an answer instead. *tip to Dmitri:- Allow 0 points to comment in this demo/trouble shooting area, you're missing out on a lot of help by setting the comment limit here.
Anyways, As an answer again... I can't see the [URI_PARTS] or 'DIR =' anywhere in the !config.ini. Not in the 'lampcms' download, and not in the 'LampCMS-master' from github.

Please, your input valued muchly

answered May 6, 2013 at 5:55 AM
Stop looking everyone....I found it. :) Damned if I know why I couldn't see it before (twice even :) )
May 9, 2013 02:58 AM
This is possible now.
Look for the DIR setting in then
[URI_PARTS] section in !config.ini
For example you can set
DIR = "/forum"
then your Lampcms program will be accessible from the url
answered April 14, 2013 at 7:48 AM
Pages : 1 | 2 >

Your answer

Join with account you already have