direct domain installation (without serendipity folder)?

Having trouble installing serendipity?
Post Reply
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

direct domain installation (without serendipity folder)?

Post 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.
The good news is the bad news is wrong! Random Kindness Project
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: direct domain installation (without serendipity folder)?

Post 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:

Code: Select all

RewriteEngine Off
2. Make sure your serendipityHTTPPath setting points to "/" and not "".

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post 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...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Guest, I posted the exact contents of the htaccess file already. Look above!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
furious
Posts: 1
Joined: Wed Apr 27, 2005 8:30 am

Post 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...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

s9y in /, gallery in /gallery -> how to change rewriterul

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: s9y in /, gallery in /gallery -> how to change rewrit

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Re: s9y in /, gallery in /gallery -> how to change rewrit

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: s9y in /, gallery in /gallery -> how to change rewrit

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post by zoran »

You are the best.

And I removed your previous "RewriteRule ^gallery/(.*) gallery/$1 [L,QSA]" suggestion :)
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post 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?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post 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! ;)
Post Reply