Page 1 of 1
direct domain installation (without serendipity folder)?
Posted: Tue Apr 26, 2005 3:16 am
by n2ition
This may be a very stupid question but is it possible to install s9y into the root folder of a domain without the /serendipity folder, thus avoiding the need to rewrite the .htaccess file to forward to the blog if that is all that is being hosted at the domain?
All the installation instructions I have seen indicate the files should be inside the /serendipity folder.
Re: direct domain installation (without serendipity folder)?
Posted: Tue Apr 26, 2005 12:06 pm
by garvinhicking
This is perfectly possible.
There are just 2 gotchas when using the setup:
1. If you use mod_rewrite and have files in subdirs, you need to put a .htaccess into your directory which is unrelated to SErendipity:
2. Make sure your serendipityHTTPPath setting points to "/" and not "".
Regards,
Garvin
Posted: Wed Apr 27, 2005 8:23 am
by Guest
i'm having hte same problem but no nothing of htaccess
could you post the exact contents of th htaccess file please that would help me out a lot...
Posted: Wed Apr 27, 2005 2:45 pm
by garvinhicking
Guest, I posted the exact contents of the htaccess file already. Look above!
Regards,
Garvin
Posted: Wed Apr 27, 2005 8:38 pm
by furious
hmm
i've had the same question for a while
and i created an .htaccess file - when open, the only text in that file is "RewriteEngine Off " - and then i put it in the main /html dir. then i put in all the serendipity files in the same folder so they are also in /html. i then go to the domain and/or the domain/index.php and nothing happens and i'm told to create an index.html file or an .htaccess file (which i thought i already did)
i'm obviously missing something
i'm sorry to be a bother
any ideas?
is it something with chmod?
do i create an .htaccess file that simply redirects to a subfolder with the serendipity installation?
help...
Posted: Thu Apr 28, 2005 2:04 pm
by garvinhicking
furious: You need to put the .htaccess file with those contents into each subdirectory which is not related to serendipity! In the directory where serendipity is installed it needs its own .htaccess file.
Notice that this thread is about installing serendipity in /html and using applications in /html/guestbook or /html/gallery/ or so. The .htaccess would then need to be put into the guestbook or gallery subdirectory.
This thread is not about how you can get serendipity to display as the top page if you installed it in /html/serendipity. There's another thread in this forum dealing with this, you can surely look it up.
Regards,
Garvin
s9y in /, gallery in /gallery -> how to change rewriterul
Posted: Thu Nov 24, 2005 8:51 pm
by zoran
Hi,
I'm having trouble with the rewrite rules when installing s9y in the root folder. I have a gallery installation in /gallery. In the FAQ and some threads on the forum, it is advised to use a .htaccess file where the rewrite engine is turned off.
Unfortunately, gallery (1.5) comes with its own .htacces with the following:
Code: Select all
# BEGIN Gallery section
# (Automatically generated. Do not edit this section)
# Note: still under development, so format may change.
# If you edit this file, make a backup before runnng the Config. Wizard.
php_value post_max_size 20971520
php_value upload_max_filesize 20971520
php_value magic_quotes_gpc off
php_value session.save_handler files
php_value register_globals off
Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /gallery/view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /gallery/view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$ /gallery/$1 [R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$ /gallery/view_album.php?set_albumName=$1 [QSA]
</IfModule>
# END Gallery section. Add User changes below this line
Can anybody point out what rule should be added in order to have /gallery resolve to the index?
Best regards, Zoran
Re: s9y in /, gallery in /gallery -> how to change rewrit
Posted: Fri Nov 25, 2005 12:28 pm
by garvinhicking
Zoran,
Add a rewriterule like this in your s9y htaccess, as one of the first rules:
Code: Select all
RewriteRule ^gallery/(.*) gallery/$1 [L,QSA]
The "L" option is important, as it tells the htaccess to not process any further rewrites if gallery/ applies.
I have not tested that, so you might need to adjust the Regex.
Regards,
Garvin
Re: s9y in /, gallery in /gallery -> how to change rewrit
Posted: Wed Nov 30, 2005 10:29 pm
by zoran
Thanks for the quick reply Garv. If only I was as quick to do the fix!
Unfortunately it doesn't do the trick. The strange thing is that the deeper lying pages (such as albums) do resolve.
This works:
-
http://linda.kovacevic.nl/gallery/index.php
-
http://linda.kovacevic.nl/gallery/rein
This does not work:
-
http://linda.kovacevic.nl/gallery/
With or without the extra rewrite rule you suggested.
If tried some derivates but to no avail.
I've only just looked at mod_rewrite, but I give a +1 to this saying in the Apache doc: "
Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo."
Zz.
Re: s9y in /, gallery in /gallery -> how to change rewrit
Posted: Thu Dec 01, 2005 12:02 pm
by garvinhicking
Hi zoran!
For that problem, put a .htaccess inside your gallery directory to set "DirectoryIndex index.php" (or whatever the usual gallery index filename is)
Best regards,
Garvin
Posted: Thu Dec 01, 2005 12:10 pm
by zoran
You are the best.
And I removed your previous "RewriteRule ^gallery/(.*) gallery/$1 [L,QSA]" suggestion

Posted: Thu Dec 01, 2005 10:56 pm
by PerfectCr
garvinhicking wrote:Guest, I posted the exact contents of the htaccess file already. Look above!
Regards,
Garvin
I have installed Serendipity into the root directory with no issues. However I did not creaste any htaccess files. I only have one directory that no related to SY9 in my FTP but it has not caused any issues. Should I change anything if all is working well?
Posted: Fri Dec 02, 2005 3:40 am
by judebert
Engineer's Rule: If It Ain't Broke, Don't Fix It!
No, you don't need to change anything. In fact, don't. There's nothing security-related in the .htaccess that Garvin posted, so if everything is working, leave it alone.
Posted: Fri Dec 02, 2005 4:41 am
by PerfectCr
judebert wrote:Engineer's Rule: If It Ain't Broke, Don't Fix It!
No, you don't need to change anything. In fact, don't. There's nothing security-related in the .htaccess that Garvin posted, so if everything is working, leave it alone.
Good advice! I won't touch it!
