Click to See Complete Forum and Search --> : quick question
Is it best to use multiple pages in a site or only one and process a query string to determine what to display? – does it matter?
hewligan
12-08-2007, 10:53 AM
It's better to either:
1) Use mutliple pages or
2) Fake using multiple pages using something like mod redirect in apache.
Why? Search engines.
Actually, the other reason is that you end up with rally ugly URLs. Which may or may not be an issue. But a single URL that produces different pages based on GET request values does not fare well with the search engines.
so these:
www.whatever.com?page=home
www.whatever.com?page=contact
www.whatever.com?page=services
would not be as good as these:
www.whatever.com/home.html
www.whatever.com/contact.html
www.whatever.com/services.html
???
chalsema
12-08-2007, 08:12 PM
That's right, search engines have a better time with urls that don't have "?" or other characters in them (then again, so do people).
Neballer
12-11-2007, 12:40 AM
What's the point?
Just to do it, or do you have a more practical reason in mind?
hewligan
12-11-2007, 12:43 AM
Well, I would guess the point is to implement an easy to use templating system. That is, you have a single page and, based on the query string, the PHP includes the main page content.
The problem with that is, as has been mentioned, search engines really don't like it.
It's better to have a before_content and after_content template, and then use PHP to include them from each of the individual pages, which have normal URLs.
I was just going to use it for setting up my site. Have everything done via query string with ajax. However, apparently thats not the best way to handle this. However, my entire portfolio framework uses queries and ajax so I don't think there will be a problem with that. My websites only going to have about four pages anyway. However, I was looking forward to doing everything with ajax and server side scripting,lol – oh well
chalsema
12-12-2007, 10:30 AM
If it's just for your personal/portfolio site, you may not care what the search engines think. I'd say give it a try, it could be another "piece" in your portfolio showing a little bit of what you can do with ajax...
Neballer
12-12-2007, 05:04 PM
I'd agree with Chalsema.
You'll want to showcase what you know. I'd say go nuts with the scripting and hang SEO.
kevincdg
12-18-2007, 09:13 PM
unless you want people to find you through a search engine, of course!
no ones going to find me through a search engine anyway,lol