How To Make s9y ignore Real Folders?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you do a search+replace in the SQL dump of your old dir to the new dir, this can replace the images properly in your blog posts.

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/
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

thanks gravin, i'll look into it tonight
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

i've followed the instruction in the url to move to subdir but it was total failure

kept redirecting to
root.com/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/blog/
and it was giving page not found.

any idea? is that http://s9y.org/198.html#A2 working with the new version?

thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What did you exactly search and replace? Of course you cannot replace "/" to "/blog", that will lead to recursion. Instead you would need to replaced

"/
'/
http://domain/

with

"/blog
'/blog
http://domain/blog/

for example. Always make sure your replacement only occurs singularly.

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/
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

garvinhicking wrote:Hi!

What did you exactly search and replace? Of course you cannot replace "/" to "/blog", that will lead to recursion. Instead you would need to replaced

"/
'/
http://domain/

with

"/blog
'/blog
http://domain/blog/

for example. Always make sure your replacement only occurs singularly.

Regards,
Garvin
ok, i'll try it now..

this is my defaults now.
serendipityPath

Code: Select all

/customers/domain.com/domain.com/httpd.www/
serendipityHTTPPath

Code: Select all

/
baseURL

Code: Select all

http://www.domain.com/
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

i'm sorry, i don't know what is happening. i've tried almost everything.
do you mind looking at the paths i gave in the previous reply and tell me the right replacements for it?

thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Replacing "/" with "/blog" is indeed a bit harder. This is why I wrote that you need to replace

"/

with

"/blog/

because this will replace things like

<a href="/blabla">

to

<a href="/blog/blabla">

and also

<img src="/uploads/bla"

with

<img src="/blog/uploads/bla"

The same applies to '/ if you used <img src='/ somewhere.

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

Post by judebert »

Hey, I got another idea!

You could leave Serendipity in the root folder (you did back everything up, right? Good) and tell Apache not to rewrite in a particular directory by adding a line like this to your .htaccess:

Code: Select all

RewriteRule /the_directory.* - [L,QSA]
Then the main .htaccess wouldn't do any rewriting. But the one in the subdirectory should still do all its work.
Judebert
---
Website | Wishlist | PayPal
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

@judebert Tried it and didn't work // i really hope if i can keep s9y on my root.

@garvinhicking tried it but the browser doesn't load s9y in "/blog/

only when i write in the address bar "/blog/index.php"

also once moved the templates didn't work at all
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

After moving, did you edit your .htaccess file and replace / with /blog/? It should happen once in the DirectoryIndex direcitve...

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/
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Post by ameo »

thanks , it's working now,
i think the .htaccess step should be mentioned in the faqs http://s9y.org/198.html

i never thought to look in the file for something to change

thanks again buddy
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

There is one other alternative. You can use mod_alias to create an alias for your app directory. You will need access to your server's httpd.conf file though.

Something like this:

you install s9y in /home/www/s9y
You install other app in /home/www/otherapp

The you create an alias in the vhost config for s9y so that http://examples9yblog.com/app loads whatever is in /home/www/otherapp

alias /app /home/www/otherapp

I have used this successfully without problems.

http://httpd.apache.org/docs/2.0/mod/mod_alias.html
Post Reply