problems with index.php

Status
Not open for further replies.

rustyrex

New Member
Messages
7
Reaction score
0
Points
0
my site is based on textpattern (basically a blogging platform) if I go to http://www.rustyrex.co.cc/rustyrex/ I recieve the following error
Not Found

The requested URL /home/tr1umph/public_html/rustyrex/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
the file is there, proof of this is that if you go to http://www.rustyrex.co.cc/rustyrex/index.php it displays correctly..development of my site stopped as soon as I noticed this problem.

I currently have a redirect on the root of my site that points to the index.php however the links used in textpattern do not use the /index.php suffix (and I can't change that) so other pages are inacessable.

I looked into the htaccess file and this is empty (i believe this has something to do with index files) when i tried to install frontpage extensions it failed saying
Error: The server extensions were unable to access the file "srm.conf". Please check the file permissions.
any help would be great!
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
Remove the redirect as it auto picks up index.php also check in the textpattern original files for the .htaccess.
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Hello inside cPanel there is a domain redirects button.
 

rustyrex

New Member
Messages
7
Reaction score
0
Points
0
This is whaqt the redirects page from cpanel says
There are no redirects configured for your account.
Does this mean there is something wrong with my account?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Which .htaccess did you look in? My guess is that you have one in public_html and one in public_html/rustyrex

Also, seeing the code in rustyrex/index.php would help.
 
Last edited:

rustyrex

New Member
Messages
7
Reaction score
0
Points
0
my .htaccess contains the following (this is from http://www.rustyrex.co.cc/rustyrex/)
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

and this is the content of the index.php

<?php
/*
$HeadURL: https://textpattern.googlecode.com/svn/releases/4.2.0/source/index.php $
$LastChangedRevision: 3189 $
*/

// Make sure we display all errors that occur during initialization
error_reporting(E_ALL);
@ini_set("display_errors","1");

if (@ini_get('register_globals'))
foreach ( $_REQUEST as $name => $value )
unset($$name);
define("txpinterface", "public");

if (!defined('txpath'))
{
define("txpath", dirname(__FILE__).'/textpattern');
}

// save server path to site root
if (!isset($here))
{
$here = dirname(__FILE__);
}

// pull in config unless configuration data has already been provided (multi-headed use).
if (!isset($txpcfg['table_prefix']))
{
// Use buffering to ensure bogus whitespace in config.php is ignored
ob_start(NULL, 2048);
include txpath.'/config.php';
ob_end_clean();
}

include txpath.'/lib/constants.php';
include txpath.'/lib/txplib_misc.php';
if (!isset($txpcfg['table_prefix']))
{
txp_status_header('503 Service Unavailable');
exit('config.php is missing or corrupt. To install Textpattern, visit <a href="./textpattern/setup/">textpattern/setup/</a>');
}

include txpath.'/publish.php';
textpattern();

?>

My son is also experiencing this issue, http://princesparkle.co.cc/blog/ doesnt work but http://princesparkle.co.cc/blog/index.php does. He made the redirect for me after doing his own, he also said this wasn't necessary before the restore.

I think it is important to note that my installation of text pattern was after the restore and his was before - but we have the same problem.

If you need any more information I am happy to give it :rolleyes: Thanks for the help.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
In your .htaccess file, uncomment and change the RewriteBase so that it looks like
RewriteBase /

Then post back to tell me if that fixes your issue. If it does not, can you then please explain what you are trying to accomplish with those redirects, as I can't seem to figure out exactly what they're trying to do just by looking at them.
 

rustyrex

New Member
Messages
7
Reaction score
0
Points
0
that did the trick! (I had to ad /rustyrex to the line AND remove the comment)

this is the .htaccess file that came with textpattern :rolleyes: I have never modified/looked at one before.

Thank you everyone for your time, and a big thumbs up for x10!
 
Status
Not open for further replies.
Top