Move index.php?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Move index.php?

Post by Don Chambers »

I originally installed s9y at www.mysite.com/serendipity/. All the paths point to that location, both in relative terms, and absolute.

The original thinking was that the blog would be yet another page on my website since the site itself if much more than a blog.

Now, with the help of many people here, I have reconstructed most of my homepage within the blog page. So, the blog could now become the homepage.

Is this as simple as replace the index.htm with the s9y index.php file and leave everything else in the current /serendipity/ folder structure?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Move index.php?

Post by garvinhicking »

No, it's not.

You need to create a index.htm/index.php that redirects to your /serendipity/ location, either via a php header('Location: /serendipity/index.php') or via a HTML META refresh (you can google that up, I guess *g*)

Or you create a .htaccess file (that only works for apache servers) that has a

Code: Select all

DirectoryIndex /serendipity/index.php
in it.

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Thanks Garvin, I am familiar with META HTTP-EQUIV="refresh" url=....

Is redirection a bad thing from an indexing perspective?


In the future, I plan to do another site. Is it safe to assume that it would be better to NOT install s9y into a subfolder, and keep it on the "root" of the domain?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

In terms of editing, redirection is not a bad thing.

The best way, from a google perspectiv, would be to use a PHP script or something like that to trigger a full HTTP header redirect. Then you can set the HTTP 302 header, which means "permanently moved" and scores best for Google. An example for that kind of redirection is my "http://blog.garv.in" redirection URL.

If you want Serendipity to show up as your default site, I do agree with you that setting it into the root directory is the easiest thing to do.

HTH,
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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Garvin - you can kill that other thread on plugins if you like since I plan to reinstall.

Reading the technical documents seems to suggest that s9y should still be installed in a folder.... am I misunderstanding that? I want it to load up when anyone hits my dotcom.

Also, I need to keep my current index.htm file working until I finish tweaking s9y. Can I simply name my index file (s9y configuration setting) welcome.php for now, then delete my existing index.htm and allow browsers to default to welcome.php, or rename it index.php?
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

HELP!!!!!!!!!!!!!!!

Post by Don Chambers »

I need some help REAL FAST!!!!

I am working on a replacement installation for s9y. First time install was to mysite.com/serendipity/

This time, I am attempting to install in my root directory. I am not quite ready for the s9y pages to become my homepage, so I had hoped to continue using my index.htm as the home page, and had instructed s9y to use its index file as welcome.php. I was led to believe that index.* would supercede welcome.*, and therefore be called first without creating a browser conflict. However, any call to my dot com is now pulling up s9y, and not my index.htm. How do I prevent this??? I am not ready for s9y to be the homepage!

This is VERY time sensitive.... every minute that ticks by is pointing my site at the wrong page.
=Don=
Brendon K
Regular
Posts: 44
Joined: Thu Feb 23, 2006 10:35 pm
Location: Saratoga Springs, NY, USA
Contact:

Post by Brendon K »

Assuming you know how to use FTP and you don't have any other PHP files in your root directory, change the name of "index.php" to "welcome.php" and I would have to assume that things should work fine so long as you're not using mod_rewrite options in your blog...otherwise, I don't entirely know how it would work. You might need to turn off mod_rewrite or Apache error handling (URL Rewriting in "Appearance and Options" in Administration-Configuration) until you're ready to go live.
They say, "Practice makes perfect," yet they also say, "Nobody's perfect." I don't get it.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Thanks for your input Brendon - I had just figured it out before your post, and was about to post the solution.

I had already done exactly what you recommended.... unfortunately, it was not enough. S9y writes a .htaccess file.... the original file includes the following:

Code: Select all

DirectoryIndex /welcome.php
This needs to change to this:

Code: Select all

DirectoryIndex /index.htm /welcome.php
Now my index.htm takes priority, which would have happened by default had this instruciton not existed. I'm assuming that I can either delete my index.htm file when I am ready, or otherwise modify this file for the proper behavior when I am ready for the s9y page to become the default.

But again, thanks for the reply! Much appreciated.
=Don=
Brendon K
Regular
Posts: 44
Joined: Thu Feb 23, 2006 10:35 pm
Location: Saratoga Springs, NY, USA
Contact:

Post by Brendon K »

The easiest solution would be to just delete the .htaccess file. (I apologize for not realizing Serendipity did this, I'm still quite new to the system...ummm, less than a week.)

Most hosts, if they allow PHP, will place PHP AFTER htm and html files in the order of precedence. Either way, by deleting the .htaccess file, normal behavior would occur where the index.htm file would be your main site's page, and you could just link to welcome.php. When you're ready, rename welcome.php to index.php and see if it takes control. If not, then you can safely remove index.htm and all is well.

...there's more than one way to do it. TMTOWTDI
They say, "Practice makes perfect," yet they also say, "Nobody's perfect." I don't get it.
Post Reply