Redirect subfolder to a catagory

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
mpking
Regular
Posts: 13
Joined: Fri Oct 12, 2007 2:02 pm

Redirect subfolder to a catagory

Post by mpking »

So I used to have a different website in a subfolder off my root. The software that it was using go hacked. (SQL injection)

So i've deleted the entire folder (and it's accompany database, and I'm changing all my passwords now).

What I'd like to do is redirect the folder to a specific catagory in my root folder..

EG http://www.mpking.com/cca
redirect to:
http://www.mpking.com/categories/13-CCA

I made a index.php with the following and placed it in the cca folder:

Code: Select all

<?php
// Permanent redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.mpking.com/categories/13-CCA");
exit();
?>
But i just get redirected to the root folder.

I have URL Rewriting set to use Apache errorhandling. (it was defaulted to none)

What am I missing?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Redirect subfolder to a catagory

Post by garvinhicking »

Hi!

It seems that because you use only "/cca/" some other default URL gets called. If you explicitly call http://www.mpking.com/cca/index.php it works. Check your .htaccess of the /cca/ directory to see if it specifies another IndeFilex than index.php.

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/
mpking
Regular
Posts: 13
Joined: Fri Oct 12, 2007 2:02 pm

Post by mpking »

I just made a .htaccess file with the following contents in the /cca directory

Code: Select all

ErrorDocument 404 /index.php
DirectoryIndex /index.php
had no affect

Then I realized that code expressly calls the root, so I tried


Code: Select all

ErrorDocument 404 index.php
DirectoryIndex index.php

Still appears to have no effect.

My webhost is godaddy if that helps (linux hosting)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Try Directoryindex /cca/index.php

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/
mpking
Regular
Posts: 13
Joined: Fri Oct 12, 2007 2:02 pm

Post by mpking »

garvinhicking wrote:Hi!

Try Directoryindex /cca/index.php

Regards,
Garvin
Thanks, that was it!
Post Reply