Search

Hi Symphonians!

I wanted to install new Symphony today and I encountered a pretty hard thing to solve. Symphony went to a /publichtml/mynewwebsite directory, because the /publichtml directory has already some website with its own CMS. The problem is that this CMS is based on a /.htaccess file which has its own rewriting rules.

And Symphony doesn’t work :( When I go to domain.com/mynewwebsite, the root .htaccess file rewrites URL to something for the benefit of old CMS.

What should I add to /publichtml/.htaccess file? I want it to treat mynew_website as a directory, the rest should stay as it was.

I could try to solve it myself, but Apache rewriting rules are not a “one-hour-to-learn” stuff. I’m sure some of you, much more experienced programmers than me, already met that problem ;)

Here is /public_html/.htaccess:

AddHandler x-httpd-php .php

RewriteEngine On
RewriteBase /


RewriteCond %{HTTP_HOST} ^hotelplatinum.pl(.*) [NC]
RewriteRule ^(.*)$ http://www.hotelplatinum.pl/$1 [R=301,L]

RewriteRule ^admin/?$ admin/ [L]
RewriteRule ^test/?$ test/ [L]
RewriteRule ^([a-z]+)/?$ index.php?lang=$1 [L]

RewriteRule ^adclick/([0-9]+)?/?(.*)$ index.php?mod=_adclick&id=$1&link=$2 [L]

#RewriteCond %{QUERY_STRING} ^baner=(.*)$
#RewriteRule ^hotelplatinum/$ templates/flash/_loader.swf?baner=%1 [L]

RewriteRule ^([a-z]+)_page_([0-9]+)_([0-9]+)?.html$ index.php?lang=$1&mod=page&id=$2&sid=$3 [L]

RewriteRule ^([a-z]+)_index.html$ index.php?lang=$1 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)?.html$ index.php?lang=$1&mod=$2 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)_([0-9]+)?.html$ index.php?lang=$1&mod=$2&id=$3 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)_str_([0-9]+)?.html$ index.php?lang=$1&mod=$2&s=$3 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)_([0-9]+)_str_([0-9]+)?.html$ index.php?lang=$1mod=$2&id=$3&s=$4 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)_([0-9]+)_([a-z0-9]+)?.html$ index.php?lang=$1&mod=$2&id=$3&op=$4 [L]
RewriteRule ^([a-z]+)_([a-z0-9]+)_([a-z0-9]+)?.html$ index.php?lang=$1&mod=$2&op=$3 [L]

RewriteRule ^media/thumb_([0-9]+)?/$ templates/image/phpThumb/phpThumb.php?src=../../../media/gallery/$1_mini.jpg&w=130&h=70&zc=1 [L]
RewriteRule ^media/photo_([0-9]+)?/$ media/gallery/$1_big.jpg [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s

Try adding another rule to /public_html/.htaccess:

RewriteRule ^public_html/my_new_website - [L]

I have a similar question. I want to preserve some assets in the main directory, so I would like Symphony to be installed in a subdirectory. However Symphony is now the main site and so should be what you see if you try to access the main domain/directory from the web. How would I set this up?

I gave up for now, and just installed symphony in the main directory, and that seems to work fine. I almost had it working as a subdirectory, but the url always contained the subdirectory in it, and could not figure out how to remove that (not sure if using the language redirect extension had anything to do with it or not)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details