HighDots Forums  

? about web site layout

Search Engine Optimization Discussion about SEO/Search Engine Optimization (alt.internet.search-engines)


Discuss ? about web site layout in the Search Engine Optimization forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
d0x
 
Posts: n/a

Default ? about web site layout - 07-02-2004 , 04:14 AM






I would like my site to by as search engine friendly as possible. I made
up a main template for my website that all pages will be using. Here are
my two choices on how to layout the website. Which one is more search
engine friendly?? any tips are welcome too.

Method A) I make my main template and call it "domain.com/index.php" if i
want to go to another page it would all be pulled up through that same
file. ie: index.php?page=about or index.php?page=articles. Using this
method makes it far easier to make changes to the template as I go. I
change a single file, and it effects every page. My fear is that search
engines will see this as just one page, and not a bunch of seperate pages.

Method B) For every page (about.php or services.php) I make a copy of
template, and make changes accordingly. The only way that I can see to be
able to update all pages dynamically is to keep most of the "template"
html in external files. and have each page look like the following:
<? php include ("html/top.htm"); ?>
SOME HTML FOR THIS PAGE HERE...
<? php include ("html/bottom.htm"); ?>
my actual page would require about 8 of these includes. This method would
solve my search engine fear from method A, and keep the maintainance
pretty low, but all those includes make me worry about performance.

Thanks!


Reply With Quote
  #2  
Old   
Jan Harders
 
Posts: n/a

Default Re: ? about web site layout - 07-02-2004 , 04:24 AM






d0x <dan (AT) no (DOT) spam> typed:
Quote:
Method A) I make my main template and call it "domain.com/index.php"
if i want to go to another page it would all be pulled up through
that same file. ie: index.php?page=about or index.php?page=articles.
Using this method makes it far easier to make changes to the template
as I go. I change a single file, and it effects every page. My fear
is that search engines will see this as just one page, and not a
bunch of seperate pages.

Method B) For every page (about.php or services.php) I make a copy of
template, and make changes accordingly.
why not get a combination of both. Do you use Apache as your webserver? Can
you use mod_rewrite on it?
If so, you could have method b) to the outside, using about.php and have
method a) on the inside, so that your script runs as index.php?page=about.
The idea is to rewrite the request (well, it's done by an additional
internal request, but that shouldn't get you into trouble with performance).
http://httpd.apache.org/docs/mod/mod_rewrite.html
http://httpd.apache.org/docs/misc/rewriteguide.html




Reply With Quote
  #3  
Old   
d0x
 
Posts: n/a

Default Re: ? about web site layout - 07-02-2004 , 04:36 AM



On Fri, 02 Jul 2004 10:24:10 +0200, Jan Harders wrote:

Quote:
d0x <dan (AT) no (DOT) spam> typed:
Method A) I make my main template and call it "domain.com/index.php" if
i want to go to another page it would all be pulled up through that same
file. ie: index.php?page=about or index.php?page=articles. Using this
method makes it far easier to make changes to the template as I go. I
change a single file, and it effects every page. My fear is that search
engines will see this as just one page, and not a bunch of seperate
pages.

Method B) For every page (about.php or services.php) I make a copy of
template, and make changes accordingly.

why not get a combination of both. Do you use Apache as your webserver?
Can you use mod_rewrite on it?
If so, you could have method b) to the outside, using about.php and have
method a) on the inside, so that your script runs as index.php?page=about.
The idea is to rewrite the request (well, it's done by an additional
internal request, but that shouldn't get you into trouble with
performance). http://httpd.apache.org/docs/mod/mod_rewrite.html
http://httpd.apache.org/docs/misc/rewriteguide.html

ah yes, good all mod_rewrite. im not sure why i didn't think of that.
Luckily, the site is run a my own server so I will probably end up doing
exactly that. So for this instance that is the perfect solution. However,
just for future reference, in the case that I did not have access to that,
what would be the best solution?

Thanks again!


Reply With Quote
  #4  
Old   
d0x
 
Posts: n/a

Default Re: ? about web site layout - 07-02-2004 , 04:43 AM



I just answered my own question.
just for kicks i tried making a ".htaccess" file with the following
contents:

RewriteEngine on
RewriteRule search http://www.google.com


then popped open mydomain.com/search, and sure enough it brought me right
there.




Reply With Quote
  #5  
Old   
Jan Harders
 
Posts: n/a

Default Re: ? about web site layout - 07-02-2004 , 04:54 AM



d0x <dan (AT) no (DOT) spam> typed:
Quote:
I just answered my own question.
just for kicks i tried making a ".htaccess" file with the following
contents:

RewriteEngine on
RewriteRule search http://www.google.com


then popped open mydomain.com/search, and sure enough it brought me
right there.


Yeah, but that would be an external redirect (one where your server tells
the client to go and make another request to the other url - not very
se-friendy).
internal would be like

RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} /(.*)\.php$
RewriteRule .?^ index.php?page=%1 [L]

which is untested, of course
first line makes sure that we aren't running into a loop by rewrting
index.php to index.php.
second one matched all requests that are /*.php (the $ at the end is just
like in perl-regexps, end of string, like that so you can always use *.php4
et al, that won't be rewritten).
and the RewriteRule than rewrites the whole thing.





Reply With Quote
  #6  
Old   
d0x
 
Posts: n/a

Default Re: ? about web site layout - 07-02-2004 , 06:53 AM



I futsed around with rewrite for a bit. most of which was unsuccessful.

anyway, here is what I finally came up with. which works just as I would
like

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ index.php?page=$1

perfecto.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.