2 users online. Create an account or sign in to join them.Users
Problem with links after moving Symphony installation
This is an open discussion with 4 replies, filed under Troubleshooting.
Search
Can you post your full .htaccess?
### Symphony 2.0.x ###
Options +FollowSymlinks -Indexes
RewriteEngine on
### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]
RewriteRule .* - [S=14]
### IMAGE RULES
RewriteRule ^image/(.+.(jpg|gif|jpeg|png|bmp))$ extensions/jit_image_manipulation/lib/image.php?param=$1 [L,NC]
### CHECK FOR TRAILING SLASH - Will ignore files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
### ADMIN REWRITE
RewriteRule ^symphony/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L]
### FRONTEND REWRITE - Will ignore files and folders
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/?)$ index.php?symphony-page=$1&%{QUERY_STRING} [L]
######
You will need a rewrite base, and it needs to be set to the DOCUMENT_ROOT for Symphony. As some of the extensions available use rewrite rules that are not consistent, using a RewriteBase ensures that they all work from the root.
If the DOCUMENT_ROOT for your VirtualHost is /var/www/virtual/domain.com/htdocs and Symphony is installed here, then the RewriteBase needs to be /.
If you're having issues with that though, then it may be a problem with the set up for the VirtualHost itself, as the .htaccess file is correct.
It seems like you're using Symphony 2.0 (looking at your htaccess). Any reason not to update to 2.2?
Create an account or sign in to comment.
Hiya, I have just moved my Symphony installation from my home server to my live server, however I am having one problem.
When I click on a link, because it doesn't have a slash on the end, it tries to forward to right page except it forwards to domain.com/var/www/virtual/domain.com/htdocs/link rather than domain.com/link and hence doesn't work.
It worked fine on my local server, and the only thing I have changed since then is to take out the RewriteBase in the .htaccess. I did try changing to to just / but that put it into a loop for some reason.
Thanks a lot, Daniel