Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-08 23:12:35

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

new install working along side old HTML files (index.html intact)

I’m trying to work on a new install and I would like for my old site to continue to function.

Currently I have an index.htm file as the home page, but I would like to work with Textpattern while that is there.

Here’s my .htaccess info:

DirectoryIndex index.htm index.html index.php
<IfModule mod_rewrite.c>
#RewriteBase /
#RewriteEngine On
#RewriteCond %{REQUEST_FILENAME} -f [OR]
#RewriteCond %{REQUEST_FILENAME} -d
#RewriteRule ^(.+) – [PT,L]

#RewriteRule ^(.*) index.php
</IfModule>

I’ve commented out the Rewrite stuff. I don’t fully understand everything in the .htaccess file and would love some tips on how to handle this.

I would like to have clean urls (which work if I want to lose the htm file), but do I need to use messy urls while I work on it?

[basic scenario: I want to hit www.mysite.com and have it go to index.htm, but i want to be able to type in www.mysite.com/index.php and see the output of textpattern]

Offline

#2 2006-05-08 23:36:27

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: new install working along side old HTML files (index.html intact)

saturnflyer,

i dont know of textpattern removing any files when it is installed (only replacing them if they happen to match a file in the textpattern system).

going by your htacces file, the server should goto the index.htm file first. there shouldnt be any need to uncomment out the Rewrite conditions because i do believe you wont be able to work with textpattern with them off.

backup your data and try it out.

Offline

#3 2006-05-08 23:43:43

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: new install working along side old HTML files (index.html intact)

thanks.
I did try it out. For some reason it went to index.php instead of .htm
I guess this is a hosting issue…?

Offline

#4 2006-05-09 00:14:55

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

Re: new install working along side old HTML files (index.html intact)

I’ve commented out the Rewrite stuff. I don’t fully understand everything in the .htaccess file and would love some tips on how to handle this.

In english, it means, “If a url is requested which exists as an actual file or directory, then fetch it. Otherwise pass the request to Textpattern”.

I would like to have clean urls (which work if I want to lose the htm file), but do I need to use messy urls while I work on it?

[basic scenario: I want to hit www.mysite.com and have it go to index.htm, but i want to be able to type in www.mysite.com/index.php and see the output of textpattern]

You should be able to on your site, clean urls and all, while still keeping index.htm up as your site index. I myself use DirectoryIndex index.html index.php, so that as soon as I want to work on my site I can pop an index.html in there, and I’ve had no problems.

I did try it out. For some reason it went to index.php instead of .htm
I guess this is a hosting issue…?

That’s odd. As I said, that should work just fine. Is what you’ve posted the entire contents of your .htaccess file? It might be a hosting issue, but I couldn’t really say.

Offline

#5 2006-05-09 02:19:20

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: new install working along side old HTML files (index.html intact)

That’s not my full .htaccess

I’m not sure what’s being done on the site currently so since I’m not totally familiar with htacces and all the lingo, I haven’t removed anything.

The DirectoryIndex command doesn’t seem to be working. As soon as I turn on the RewriteRule ^(.*) index.php it goes right to the .php page.

I’m hosted on LunarPages, if anyone out there has any advice, but here’s my full file:

#- FrontPage -

IndexIgnore .htaccess /.?? ~ *# */HEADER /README /_vti

<Limit GET POST>
#The next line modified by DenyIP
order allow,deny
#The next line modified by DenyIP
#deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.tcgconsulting.net
AuthUserFile /home/tcgcco2/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/tcgcco2/public_html/_vti_pvt/service.grp

<Files 403.shtml>
order allow,deny
allow from all
</Files>

DirectoryIndex index.htm index.html index.php

< IfModule mod_rewrite.c >
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]

#RewriteRule ^(.*) index.php
< / IfModule >

Last edited by saturnflyer (2006-05-09 02:29:43)

Offline

#6 2006-05-09 02:29:30

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: new install working along side old HTML files (index.html intact)

im with Mary, it should work unless your host has some unique funkiness going on in their virtual environment.

regardless, if you create a temporary page (say default_temp and point the default section to it) and then create a temporary section as the homepage/default section (say /dev) you dont really need to have that index.html file anyway. when youre done, point the default section back the default page and remove the /dev section.

Offline

#7 2006-05-09 02:42:42

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: new install working along side old HTML files (index.html intact)

thanks april19, I’m not sure I follow.

What do you mean by creating a temporary page? Do you mean to create that in txp or create an actual file? And why don’t I need my index.html file?

Sorry if I’m slow to understand, I’m just not that familiar with the software. I really appreciate the quick responses.

Offline

#8 2006-05-09 02:55:46

april19
Member
From: Sydney, Australia
Registered: 2006-03-15
Posts: 27
Website

Re: new install working along side old HTML files (index.html intact)

my bad, i will expand.

within textpattern in the ‘presentation’ menu item there is the sub menu items of ‘pages’ and ‘sections’.

firstly, create a new page (default_temp) and paste in it the code currently in your index.htm file. then go edit the default section to use the ‘default_temp’ page. you can then create a new section called what you would like (dev). leave it so the new section (dev) uses the ‘default’ page.

this means you can get carried away setting up textpattern to your liking and when you are ready to publish live, all you need to do is edit the ‘default’ section to use the ‘default’ page (you can then discard the ‘dev’ section and the ‘default_temp’ page you created).

let us know if you need further assistance.

Offline

#9 2006-05-09 03:03:50

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: new install working along side old HTML files (index.html intact)

awesome! I understand. Thanks very much!

Offline

Board footer

Powered by FluxBB