[PHP] Search Engine Friend Dynamic Pages
Hey all, Just a quick question regarding developing search engine friendly pages. Basically I am re-writing my site so that say mysite.com? page=support&action=help becomes mysite.com/support/help/ Reason why is it looks nicer and is search engine friendly, as some search engines cannot spider URLS with query strings. Anyhow my preferable method of achiving this is having all pages raise a 404 error, which then loads my custom 404 page which shall output a "200 ok header" and load the appropiate content. I have heard somewhere though, that despite overwriting the 404 header, search engines wont index the page because they think it does not exist... is this the case? If so I shall use another method, such as one where I crop the *.php extension off my files and force apache to interpret them as mime type php. Thanks for your time everyone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Search Engine Friend Dynamic Pages
Thanks for the feedback, once again timly and right on the money :) What you mention is what I thought, I just had doubts which I wished to clarify. - Original Message - From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> Date: Thursday, June 6, 2002 2:46 pm Subject: Re: [PHP] Search Engine Friend Dynamic Pages > Scott Reismanis wrote: > > > Just a quick question regarding developing search engine friendly > > pages. Basically I am re-writing my site so that say mysite.com? > > page=support&action=help becomes mysite.com/support/help/ Reason > why is > > it looks nicer and is search engine friendly, as some search engines > > cannot spider URLS with query strings. > >Ye might want to read: > >Building Dynamic Pages With Search Engines in Mind >http://www.phpbuilder.net/columns/tim19990117.php3 > >and: > >Revisited: Build Dynamic Pages With Search Engines in Mind >http://www.phpbuilder.net/columns/tim2526.php3 > > > -- > H | "Life is the art of drawing without an eraser." - John Gardner > + > > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 > x130 Director of Internet Operations / SysAdmin. > 800.441.3873 x130 > Photo Craft Laboratories, Inc.. 3550 Arapahoe > Ave, #6 > http://www.pcraft.com . . .. Boulder, CO 80303, > U.S.A. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Wrapping Text
Hi PHP digest readers. Ok I have a problem and a question which I am certain many share and even a solution to my problem, however I wish to hear how you dealt with this issue to see if there is a better method. Ok for my problem, it is regarding a smilie system. Currently what happens is if people post :P:P:P:P:P:P etc.. etc.. then the text field expands to an ugly length. My current solution which I don't really like is to limit the number of smiles which a person is allowed to use. Can anyone propose a better solution than this? i.e. wrap them using PHP or maybe I coded my html poorly which is why my table is expanding? Secondly my question on a similar note whether to convert smilies at runtime, or when a person submits a post? The beneifits at runtime is less space used in the DB, and no worring about converting the converted post back when it is needed to be edited, however with this method the server has to do more processing in converting smilies each time the post is viewed and vise versa. Thanks for your time, and I anticipate any light which can be shed on this issue. Scott
Re: RE: [PHP] Wrapping Text
Sorry I wasn't exactly clear on my explaination. I believe it is a table design issue because i tried putting spaces between the image tags. i.e. etc... and the table was still been stretched. my solution has since been to force a (using wordwrap) but I would rather force a space which i can do but this does not seem to cause the streching to stop. I guess it is my tables as my site is designed to fit any res and as such does not have set pixel width tables. back to the drawing board for me then i guess :) cheers for the suggestion - Original Message - From: "John Holmes" <[EMAIL PROTECTED]> Date: Monday, April 29, 2002 3:36 am Subject: RE: [PHP] Wrapping Text > Wordwrap() might be a good solution for you, but it's probably > more of a > table design issue. The table needs some whitespace to break to a new > line. If you are putting in a string of > etc..then there's no where to break. Try putting a space before or > afterthe when you replace the :P with it. > > And for the replacing, if the user does not edit the post, then do the > conversion when they submit it. If they do edit it, then do it at run > time. If there is editing involved, you want to present the text > back to > the user in the same format as they typed it, or otherwise they'll get > confused. If there is no editing, then you'll save processor time by > only doing the conversion once, instead of for every view. > > ---John Holmes... > > > -Original Message- > > From: Scott Reismanis [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, April 27, 2002 11:58 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Wrapping Text > > > > Hi PHP digest readers. > > > > Ok I have a problem and a question which I am certain many share and > > even a solution to my problem, however I wish to hear how you dealt > with > > this issue to see if there is a better method. > > > > Ok for my problem, it is regarding a smilie system. Currently what > > happens is if people post :P:P:P:P:P:P etc.. etc.. then the text > field> expands to an ugly length. My current solution which I > don't really > like > > is to limit the number of smiles which a person is allowed to > use. Can > > anyone propose a better solution than this? i.e. wrap them using PHP > or > > maybe I coded my html poorly which is why my table is expanding? > > > > Secondly my question on a similar note whether to convert > smilies at > > runtime, or when a person submits a post? The beneifits at > runtime is > > less space used in the DB, and no worring about converting the > converted > > post back when it is needed to be edited, however with this > method the > > server has to do more processing in converting smilies each time the > > post is viewed and vise versa. > > > > Thanks for your time, and I anticipate any light which can be > shed on > > this issue. > > > > Scott > > Powered by telstra.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpMyAdmin Question
Hey all, This question is mainly mySQL related however I believe the problem maybe caused by phpMyAdmin which is why I am posting it here. Anyhow does mySQL tables allow for a mix of char / varchar columns? Because if I try to create a table in phpMyAdmin for example: CREATE TABLE generic ( title char(20) NOT NULL, title_alternate varchar(40) NOT NULL ) TYPE=MyISAM; it will always be stored as: CREATE TABLE generic ( title varchar(20) NOT NULL, title_alternate varchar(40) NOT NULL ) TYPE=MyISAM; and I am unable to force it to char. The only reason why this is a problem is char columns are quicker to process thus it would be ideal to mix such columns rather than be forced to create another table for example, Thanks for your time, Scott Reismanis
[PHP] Regex Assistance
Hey All, I am just begining to learn regex functions in PHP. Anyhow I am trying to code a preg_replace function which basically cleans a URL. What I mean is say a url is index.php?page=hello&list=10&start=4 you pass that URL and say 'list' to the function (shown below) Anyhow I want that to then return index.php?page=hello&start=4 (see how the entire list reference is now gone) Here is what I have come up with so far, though I am yet to test it as I am coding this at work :) function stripUrl($url, $url_strip) { // Check that $url_strip is in the URL if(strpos($url,'?') && strpos($url, $url_strip.'=')) { // Lets clean up the url $url = preg_replace("/\?|&$url_strip=/", "", $url); } return $url; } My problem is that, how do I make the preg_replace stop when it encounters a & in the URL? If anyone could shed some light on this it would be appreciated, - Regards, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Intermediate "Searching..." screen.
The way vbulliten does it, is they take a users search query, and find out which threads match i.e. (2000, 5000, 2310, etc...). This is then inserted into a database along with a search ID. From here once the search is completed you are forwarded to a page like search.php? search_id=7 that way urls are kept neat and everyone is happy. To return the search resultset a query like "SELECT * FROM threads WHERE thread_id IN $result_set" Unfortunatly there are extra overheads using this method, however for my site I had to mimic such a search otherwise my URLS got excessivly huge :) Anyhow that does not really answer the question as it does not explain how to create the 'searching' screen however I know it definatly involves a javascript redirect... I will explore that tonight and tell you what I find. Regards, Scott - Original Message - >From "SP" <[EMAIL PROTECTED]> Date Tue, 28 May 2002 14:48:32 -0400 To "Kevin Stone" <[EMAIL PROTECTED]>, "Jeff Bearer" <[EMAIL PROTECTED]>, "Php-General \(E-mail\)" Subject RE: [PHP] Intermediate "Searching..." screen. Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate "Searching..." screen. Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen does it initiate the search. The last line in that script would be a redirect back to your results page. Another way to do it would be to set up a couple of Javascript functions. Echo one to open the 'searching...' screen prior to initiating the search. Then at the end of the script echo the other javascript function to close the 'searching.. ' screen. But I've implimted a version of this for an upload script and it didn't work so hot. Er.. umm.. anyone got any other bright ideas? -Kevin - Original Message - From: "Jeff Bearer" <[EMAIL PROTECTED]> To: "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Tuesday, May 28, 2002 12:23 PM Subject: [PHP] Intermediate "Searching..." screen. > I have a part of my site that searches a large database and sometimes it > takes more than a few seconds to return the results. When searches take > longer, people get antsy and search again. To let them know that the > search is working so they don't double efforts I'd like to have an > intermediate "Searching..." screen. > > I don't have a good idea on how to do this and I'm looking for some > ideas or directions. How do I show one thing while the search is running > and another when the search is complete and also not loose the returned > record set? > > -- > Jeff Bearer, RHCE > Webmaster > PittsburghLIVE.com > 2002 EPpy Award, Best Online U.S. Newspaper > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php