Forum

Thread tagged as: Problem, Configuration, Hosting

Started site with IP address now domain name doesn't render pages

I started building a site within perch behind my ip address as the domain name is controlled by my client. He has now pointed the domain name to the hosting server. But when I want to preview pages or see pages as a direct link they do not appear.

Here is an example: This was a template page I created to base all code for new articles on. https://69.195.124.222/~jfoutorg/article-template.php

Now here is the page under the actual hosted name: https://j4t.org/article-template.php

How do I fix this so all pages work under the correct domain?

After some playing around it seems I broke both pages.

Benjamin Cortes

Benjamin Cortes 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The IP address wasn't the issue - being in a subdirectory (which is what that tilde address is) is.

You will need to go into each page's options and set the new page path there. In future I'd suggest pointing a subdomain at the site when testing rather than working in a subfolder and then changing the path from root.

Thank you Rachel. I will go in and delete my pages and templates and start over. I have the local php files so this should not be a big deal.

Why would my login be so different in: https://69.195.124.222/~jfoutorg/perch/

to https://j4t.org/perch/

Drew McLellan

Drew McLellan 2638 points
Perch Support

The only way Perch knows where your pages are is by their path within the site.

If you set up a page as e.g. /~jfoutorg/index.php Perch will see that as a different page than /index.php and /foo/index.php.

Maybe this is a server issue on my end I'm confused.

If you see screen shot 1: You can see the image source is wrong. https://j4t.org/images/Screen1.png

But in screen shot 2: You see my page is pointing to root etc. https://j4t.org/images/Screen2.png

Let me check my server I never set up a user name from what I know.

Thanks for your answers so far.

Ok almost there here is what I did so far.

I went into config.php > line 15

define('PERCH_LOGINPATH', '/perch');

it has the dam prefix of ~jfoutorg

But now when I click on view page I get this crazy url: https://j4t.org/perch/core/apps/content/edit/j4t.org/street-food.php

when it should be j4t.org/street-food.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you republished your content containing the images since changing the path?

Yes I deleted all pages and templates, changed the config file and recreated my template. Also I have to place an actual page-name.php into the root folder as the software doesn't seem to create it for me when I choose to create a page.

But the page preview function seems to jump me to that long url, so I'm not sure where in the configuration this lives.

So the software seems to prefix /perch/core/apps/content/page/ in front of my actual page url. only when clicking on the view page option. This seems like the last hurdle so I can hand it off to the client to create his pages.

New page you can view is https://j4t.org/street-food.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

It sounds like you're in a big mess. Have you removed all reference to the subfolder from the config.php file and from the Settings page?

Yes I removed all references to the old file directory. Now pages are being added automatically to the root of the site.

Just the preview page url does not work. So it looks like the source of the application has the correct link but some override I assume from a front end js file is rewriting my path and hijacking my link.

Would you know what file this is I can go in and change it I just need to know where this would be?

Screen shot of mess

Drew McLellan

Drew McLellan 2638 points
Perch Support

Make sure your site path on the Settings page is root-relative. It should start with a /

That was it @Drew. Thank you sir! Under website URL I have / only and it all works!