Jump to content

All urls go to home.php


dev_panther
 Share

Recommended Posts

I got to work on an already existing processwire project. 

I downloaded the whole site folders (site + wire) and exported the database to my mac. 

I'm using the php server to serve me the pages (with the command $php -S 127.0.0.1:8080) and indeed when I go to localhost:8080 I see the homp.php page. 

The problem is that no matter what url I put after "localhost:8080" I keep getting routed to home.php page. If I click on a link to an outer site, I get there, but I can't get to any other pages in my site. Any ideas?

I'm Working on a mac with OSX.

(Also - this is my first web-developing project, so if you can be specific about any instructions regarding local servers I will appreciate it).  

Link to comment
Share on other sites

Thank you for the answer. 

unfortunately, even with all the .htaccess file commented out, the problem remains. I do not get 500 error, just always the home.php file. I think that it might be because the php command's server causes the problem. Can you please refer me to a guide that explains how to start a server that can support a proccesswire site? I failed to locate one...

Link to comment
Share on other sites

Sorry my bad. If your php server instance isn't even looking for a .htaccess file it cannot throw any errors, therefore my links wasn't to useful. 

and it seems to work, meaning when I go to "processwire/" in the browser, it shows "it works!".

"It works" is a replacement if apache doesn't find any viewable files under the provided path. Put your processwire files there and it should show these.

Link to comment
Share on other sites

Ok, I'm sorry for the basic questions, but can't seem to figure it out by myself. The 'site' folder is 

~/Sites
|           `-- _vHosts
|
 `
-- domains
                   |
                    `-- processwire
                         |
                         |-- htdocs
                         |               `
-- index.html
                         |
                          `-- logs 

I have a folder 'mySite' with all the processwire files. where should I put it and how do I reach it from the browser?

Link to comment
Share on other sites

It's dependent on what you did add to your hosts file. The example in the tutorial adds "127.0.0.1 processwire", which means: If someone asks for "processwire" serve 127.0.0.1. So your "domain" for the browser would be "processwire". You could also use any "domain" here, so "dev.localhost", "project.dev". "dev.project.com" would all work.

Link to comment
Share on other sites

I just can't seem to figure it out. Can you please try and give me an example? I think it will help me the most. 

In the processwire.conf, my DocumentRoot is defined to be /Users/MyUser/Sites/domains/processwire/htdocs/

I have a file myIndex.html under htdocs. 

Yet when open the browser on processwire/myIndex.html I get an "Object not found!" error.

Can you please explain - what should I change in the processwire.conf file, or what address to put in the browser to make it work?

Link to comment
Share on other sites

Did you follow the whole tutorial? More explicitly, did you change your hosts file? The apache conf doesn't even get called if you do not forward requests to your own apache? To be sure just follow through the whole tutorial and everything should work.

Link to comment
Share on other sites

I don´t think you should have a index.html file in your site/templates folder. Only the template files, home.php etc.  

If you have a dot in the url the page will be routed to the home page. That's my experience wit dots in urls anyway.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...