website in php
website in php
My website is done now in php, all pages have an 'include' from a main page . Does anyone know how I can set the pages to different titles, at the mo I have all the same titles on the pages and know it can be done but can't quite figure it out!
Meishka,
At first pass, how about an if statement? Depending on the name of the include, you could select different titles from an array.
I do the same thing using PHP, and I actually use a couple of includes per page. One is the page header (specifies the title and description, which is different for every page), and the other is the page content. But if I had it to do over again, I'd probably use an if statement.
At first pass, how about an if statement? Depending on the name of the include, you could select different titles from an array.
I do the same thing using PHP, and I actually use a couple of includes per page. One is the page header (specifies the title and description, which is different for every page), and the other is the page content. But if I had it to do over again, I'd probably use an if statement.
Brooke
php
thanks vrooje, am still struggling with this, will let you know if I succeed! Its a funny thing this SEO, a whileback I thought all I had to do was put the title on each page before the php includes which does work in that you get different titles for different pages but of course nothing validates at all so I changed them all back. I forgot one page and find that for certain keywords its number 1 in 3 search engines!!! Now do I leave it???? in SEO terms its all totally wrong!!!
now that i have a few slow weeks on my hands, i need to tweak the website to make it easier to maintain.
i could use either a php include or just a simple server side include, but both require a change of file extension (index.php or index.shtml versus index.htm).
is this going to mess up any progress i may have made to-date with SEO?
thanks much!
debk
i could use either a php include or just a simple server side include, but both require a change of file extension (index.php or index.shtml versus index.htm).
is this going to mess up any progress i may have made to-date with SEO?
thanks much!
debk
Don't know! But this is where I would go for the answer:
http://www.highrankings.com/forum/
That place is a goldmine of information for all things SEO. Another good one, but I think more technical, is http://forums.searchenginewatch.com/
It's good that you have some time to spare because once you get into them whole days can go by without moving from your computer.
http://www.highrankings.com/forum/
That place is a goldmine of information for all things SEO. Another good one, but I think more technical, is http://forums.searchenginewatch.com/
It's good that you have some time to spare because once you get into them whole days can go by without moving from your computer.
Paolo
Lay My Hat
Lay My Hat
Thanks, Paolo, those are extremely handy links. I already found this, which was a whole different question:
debk
Nice to know. Thanks again!However if you were, for example, converting your pages from using .html extensions to files of the same name but with a .php extension, RedirectMatch would be a good choice. That's what it's built to do. The example of this would look something like:
CODE
RedirectMatch 301 (.*)\.html$ http://www.yourdomain.com$1.php
debk