473,409 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Search engine listing

Nel
I am working on a new web site and wanted a second opinion on an idea:

Most pages will be created dynamically from text and headers in MySQL. Each
page has a pageid such as 'home' or 'aboutus'.

Rather than having the page index.php?content=aboutus as the site links I
was thinking about creating a php file automatically whenever a new page is
added. For example where the pageid = aboutus, I would create aboutus.php
The script would be the same for all MySQL pages and take the filename (less
the .php) and call the page from the database.

Hopefully this will allow all the search engines (not just Google) to list
all the pages.

Does anyone have any other/better ideas or comments?

Nel

--
DISCLAIMER: There is an extremely small but nonzero chance that,
through a process known as "Tunneling", this e-mail may spontaneously
disappear from its present location and reappear at any random place in the
Universe, including your neighbour's domicile. The sender will not be
responsible for any damages or inconvenience that may result.
Jul 16 '05 #1
2 1928
Nel
OMG
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:6b********************************@4ax.com...
On Tue, 22 Jul 2003 22:58:11 +0100, "Nel" <ne***@ne14.co.NOSPAMuk> wrote:
I am working on a new web site and wanted a second opinion on an idea:

Most pages will be created dynamically from text and headers in MySQL. Eachpage has a pageid such as 'home' or 'aboutus'.

Rather than having the page index.php?content=aboutus as the site links I
was thinking about creating a php file automatically whenever a new page isadded. For example where the pageid = aboutus, I would create aboutus.php
The script would be the same for all MySQL pages and take the filename (lessthe .php) and call the page from the database.

Hopefully this will allow all the search engines (not just Google) to listall the pages.

Does anyone have any other/better ideas or comments?
Rather than use PHP to output other PHP pages, I would strongly recommend

the use of Apache's mod_rewrite to present pages that look static to search
engines, but are in fact calls to a single PHP page with appropriate
parameters.

i.e. You can use this module so that:

/whatever/index.php

... transparently presents the output of

/aboutus.php?site=whatever

... or from wherever your content is generated; mod_rewrite is exceedingly (perhaps excessively!) flexible.

When you start generating code-from-code you run into _very_ awkward debugging problems; is your generatING code causing the problem, or your generatED code causing the problem?

[If you're not running Apache... then I'd strongly recommend you start ;-) ]
Relevant manual pages:

http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)


Hi Andy,

The documentation seems way over the top for what I need. Do you know
enough about mod_rewrite to show me one practical example for turning

www.example.com/aboutus/index.php in to
www.example.com/index.php?contents=aboutus
???

I know that I need to RTFM but a practial example will really help me
understand the bits I need to know. I can then expand from there.

Many thanks in advance

Nel
Jul 16 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Wed, 23 Jul 2003 00:50:40 +0100, "Nel"
<ne***@ne14.co.NOSPAMuk> amazingly managed to produce the following
with their Etch-A-Sketch:
The documentation seems way over the top for what I need. Do you
know enough about mod_rewrite to show me one practical example for
turning

www.example.com/aboutus/index.php in to
www.example.com/index.php?contents=aboutus
???

I know that I need to RTFM but a practial example will really help
me understand the bits I need to know. I can then expand from
there.

Many thanks in advance


RewriteEngine on
RewriteRule ^/(.*)/index.php$ /index.php?contents=$1 [L]
That should do the job =)

The (.*) grabs any chars within the first and second /. It stores the
grabbed chars in $1. The [L] specifies the last rule if that match is
achieved (ie: if you have more rules afterwards, these may well be
irrelevant, thus we want to "break out of the rule list now").

The ^ char specifies the beginning anchor tag, and the $ the last
anchor tag.

For more information on these chars, google for "Perl regex" or
"regex" (REGular EXpressions).. these will help explain further chars
you could use in the future possibly too.
HTH.

Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPx3PUGfqtj251CDhEQKd3wCgl1aN18IWtdmbDRhT45VgXx LpzVIAoO5v
6YRLdRGMqAIrcmCJunKbo2ZV
=tlB/
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
Q: Is PHP search engine friendly? Q: Will search engine spiders crawl my PHP pages? A: Spiders should crawl anything provided they're accessible. Since, nowadays most of the websites are been...
0
by: only_me | last post by:
Not a coding question as such but highly related to asp/dynamic pages issues : has anyone any suggestions on the following ASP sites are generally (always) of a dynamic nature, pages can be...
11
by: Petre Huile | last post by:
I have designed a site for a client, but they have hired an internet marketing person to incrase their search engine ranking and traffic. He wants to put extra-large fonts on every page which will...
5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
1
by: disaia | last post by:
2 problems: Example: If a person types in a part number into Yahoo: 1. Is there a way for Yahoo to list your web site as one of the results. 2. If the user clicks on your link, can your web...
2
by: Patrick | last post by:
Are the differences between a search engine, a subject directory and a meta search engine significant for an ebusiness web site owner? A meta search engine merely uses ordinary existing search...
0
by: Al Fatykhov | last post by:
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web...
4
by: MDW | last post by:
Posted this on another board, but evidently it was off-topic there...hope you folks will be able to provide some guidance. I've been working on a Web site for a business (my first non-personal...
5
by: Mark | last post by:
Hi I have an application (in vb.NET 2005) which holds data in SQL Server and some of the SQL records are simply paths to related files. I would like to be able to do a text search on both the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.