By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 2,933 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

Dynamic pages without with directory structure instead of parameters

P: n/a
Sorry for the confusing thread title, I wasn't sure how to call this.

This is my issue:

I design most of my sites with a single index.php file that takes
parameters to decide which pages to include: something like
www.blabla.com/index.php?dir=a&page=b which will include some file in
say ./a/b.html, but will have all the headers and footers that are
defined in index.php.

It could also work that way to have a b.php file in the ./a directory
that would include headers and footers but then I'd have to include
those headers in every single page I write which seems like too much
overhead.

I was fine with the way I did it but then I read that this is not good
practice, search engines don't like sites with parameters they rather
want the www.blabla.com/a/b.php form.

Is there a way to get this done nicely? How do professional sites solve
this?

Any comments or links about that topic are highly appreciated.

Thanks.

Mike

Sep 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yeah, use .htaccess. Google for ".htaccess generator and you will find
several tools that will help you do this.

falagar wrote:
Sorry for the confusing thread title, I wasn't sure how to call this.

This is my issue:

I design most of my sites with a single index.php file that takes
parameters to decide which pages to include: something like
www.blabla.com/index.php?dir=a&page=b which will include some file in
say ./a/b.html, but will have all the headers and footers that are
defined in index.php.

It could also work that way to have a b.php file in the ./a directory
that would include headers and footers but then I'd have to include
those headers in every single page I write which seems like too much
overhead.

I was fine with the way I did it but then I read that this is not good
practice, search engines don't like sites with parameters they rather
want the www.blabla.com/a/b.php form.

Is there a way to get this done nicely? How do professional sites solve
this?

Any comments or links about that topic are highly appreciated.

Thanks.

Mike
Sep 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.