Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-03 15:37:58

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Problem when moving live site to local server

I am trying to move a live site to local server. Everything went fine, and the main page is opening,
and I have access to admin interface.
But, I just cant figure out why my link to other sections are not working.
I am using this url:
http://localhost/site
and this opens main page.
But, links to sections are not working
http://localhost/site/section
I’ve read other articles here with similar topic, but couldnt find the answer.
Any help?

Offline

#2 2008-01-03 15:47:59

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Problem when moving live site to local server

Have you changed the paths in preferences and config.php file? Also check in diagnostics to see if clean urls are working.

Last edited by thebombsite (2008-01-03 15:49:58)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2008-01-03 15:55:47

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

Yes, I changed the paths, but the urls(clean) are problem.
Here’s what I get on diagnostics:

Pre-flight check
.htaccess file is missing ?
Clean URL test failed. ?

mod_rewrite is on

Last edited by AndrijaM (2008-01-03 15:56:21)

Offline

#4 2008-01-03 15:57:43

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Problem when moving live site to local server

well..your .htaccess file is missing which is definitely needed for clean urls.

Offline

#5 2008-01-03 16:00:16

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Problem when moving live site to local server

The .htaccess file is a slippery eel. On *nix-type boxes it is a hidden file. You may have to tell your FTP/Shell/Webhost panel to show hidden files before you will even be able to see it and pull it to your local box.


Steve

Offline

#6 2008-01-03 16:20:52

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

Steve, you were right, it was a hidden file, i totally forget about that.

But still not working. Now I get

Pre-flight check
Clean URL test failed. ?

Offline

#7 2008-01-03 16:54:30

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Problem when moving live site to local server

Try switching your setup to messy URLs for a moment and see if your navigation works.

Sounds like you might need to edit your local .htaccess file so that clean URLs work right on your local box. That’s quite possible as your host’s setup is likely to be somewhat different to your local setup.


Steve

Offline

#8 2008-01-04 10:21:54

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

When I switch to messy, and with cbs_navigation_menu plugin, it works.

But on the web site I didnt use cbs plugin. I’ve put my main menu in txp form with absolut paths, becouse I didnt know how to make links from one section to another.

On live site, link to another section looks like:

http://www.site/section

and thats what I put on all my links in main menu. Is there another way?

Offline

#9 2008-01-04 10:34:33

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

Ok, I gues I can use <txp:section_list /> tag.

Offline

#10 2008-01-04 10:41:09

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

This is not good. If I have to change all paths it is a lot of work. There must be a easier way.

Offline

#11 2008-01-04 13:53:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Problem when moving live site to local server

I’m just thinking out loud here but I know that whenever I install XAMPP or XAMPPlite I have to enable the “mod_rewrite” module as it is “off” by default which would stop clean URLs working.

You should find this in /apache/conf/httpd.conf

Last edited by thebombsite (2008-01-04 13:57:52)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2008-01-04 14:20:28

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Problem when moving live site to local server

Stuart

yeah, that would explain why clean URLs are failing in the diagnostic test.


Steve

Offline

#13 2008-01-04 17:26:05

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

I’m aware of mod_rewrite thing, and already enabled it. And it wasn’t working.

So, I deleted everything and start all over again. I have a book Textpattern Solutions, and followed
the tutorial how to setup a local server with xampp. After finishing, I took my live site and just
rewrite my local instalation with the db and the www files of live site. Just changed the paths and now
I got clean urls and everything is working.

Just one thing i’m not sure about.

I used absolute paths on web site. And that paths are, of course, not working on local server.

What is generaly the best way to write a link to sections or articles or categories? For instance, if I want to
put a link on some text, that is pointing to some other section in my site is

<txp:section name=“mySection”>Go there</txp:section>

the correct way to do it?

Offline

#14 2008-01-04 17:56:26

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Problem when moving live site to local server

AndrijaM wrote:

I’m aware of mod_rewrite thing, and already enabled it. And it wasn’t working.

kind of a moot point now but are you sure you restarted your apache server when you enabled mod_rewrite?

Just one thing i’m not sure about.

I used absolute paths on web site. And that paths are, of course, not working on local server.

What is generaly the best way to write a link to sections or articles or categories? For instance, if I want to
put a link on some text, that is pointing to some other section in my site is

<txp:section name=“mySection”>Go there</txp:section>

the correct way to do it?

there isn’t a right or wrong way to do it. but yes that would work just fine.

Offline

#15 2008-01-05 09:31:08

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Problem when moving live site to local server

iblastoff wrote:

kind of a moot point now but are you sure you restarted your apache server when you enabled mod_rewrite?

Yes, I am sure. I dont know what was the problem, but following the tutorial from book txp solutions, I had to change this files:

C:\WINDOWS\
SYSTEM32\DRIVERS\ETC\HOSTS

and

C:\Program
Files\xampp\apache\conf\extra\httpd-vhosts.conf

which I didn’t change the first time, becouse I was using

http://localhost/

path. Maybe that was the problem, dont know.
Everything is working now.

Thanks again.

Last edited by AndrijaM (2008-01-05 09:32:39)

Offline

Board footer

Powered by FluxBB