Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-07 00:31:04

RockOfVictory
New Member
From: Nashville
Registered: 2005-11-05
Posts: 5
Website

Restoring index.php (from a noob)

Background: I’m used to using Movable Type on Zepfanman.com, but I’ve been trying to play around with Txp on my new site, Megsnjj.com. If you saw my one other post, I’d like to have a simple URL scheme that matches the way my site sections are laid out. I’m really only using Txp as a blog CMS for now; no site sections are needed at this point.

The question: My index.php file already existed before I set up Txp (you can see it at the megsnjj.com home page). I can’t remember if I set the default Txp page as indext.php or if it automatically did that since there was already an index.php. I was just experimenting with the page name using my FTP program and deleted indext.php. How do I restore it? Also, how do I rename it as index.php when I’m ready for it to be used as the home page again?

Thanks in advance for helping me get a better handle on the basic file structure of Txp!

Offline

#2 2005-11-07 01:06:00

RenJonsin
Member
From: Tarpon Springs, FL USA
Registered: 2005-02-06
Posts: 103
Website

Re: Restoring index.php (from a noob)

just FTP another copy of index.php to your root directory. If you want to have it as indext, then rename index.php or save it as a different name then load it onto the site.

Offline

#3 2005-11-07 02:11:39

RockOfVictory
New Member
From: Nashville
Registered: 2005-11-05
Posts: 5
Website

Re: Restoring index.php (from a noob)

I’ve tried to FTP another copy, but then when I browse to indext.php, I get a 404 Not Found. Could the wiki items in my htaccess be messing something up? indext.php

Ignore the numbered bullets – they’re just a cut and paste from my htaccess (# as comment) # close the php security hole…
  1. not actually needed but probably a good idea anyway
    php_flag register_globals off
  1. first, enable the processing – Unless your ISP has it enabled
  2. already. That might cause weird errors.
    RewriteEngine on
  1. uncomment this rule if you want Apache to redirect from www.mysite.com/ to
  2. www.mysite.com/wiki/Main_Page
  3. RewriteRule ^/$ /wiki/Main_Page ®
  1. do the rewrite
    RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

#textpattern default
IfModule mod_rewrite.c RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php /IfModule php_value register_globals off

Offline

#4 2005-11-07 03:13:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Restoring index.php (from a noob)

Offline

#5 2005-11-08 02:36:43

RockOfVictory
New Member
From: Nashville
Registered: 2005-11-05
Posts: 5
Website

Re: Restoring index.php (from a noob)

That pastebin is great! I’m pretty sure that htaccess isn’t my problem, though. Notice that my indext.php is now just an unparsed Txp page. Surely I’m making this more complicated than it should be!

Furthermore, my original question still stands on how I can rename the indext file when I’m ready for it to replace the existing index.

Offline

#6 2005-11-08 02:44:11

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Restoring index.php (from a noob)

What’s in your indext.php file? Is it the same as index.php?


Alex

Offline

#7 2005-11-08 02:55:46

RockOfVictory
New Member
From: Nashville
Registered: 2005-11-05
Posts: 5
Website

Re: Restoring index.php (from a noob)

http://megsnjj.com/indext.php
http://megsnjj.com/index.php
They’re different. indext should just be the txp default page, but I can’t restore it back to normal!

Offline

Board footer

Powered by FluxBB