Hi guys,
For some reason I'm having a sod of a time with the following rule:
RewriteRule search/(.*)_P([0-9]+).html http://www.site.com/search/$1_p$2.html [R=301,L]
With the example URL:
http://www.site.com/search/lions_P4.html
... I would have expected it to match, and sends us to the new...
@ljzagorac - The reason I'm using _ and not %, is I only want it to match 1 character (where as % will match more than 1)
@jpadie - Thanks. It actually turned out to be an encoding issue when creating his SQL data.
Cheers
Andy
...reason the following SQL query doesn't want to work any more (its part of an existing program, and has worked on a million other sites);
SELECT * FROM Category WHERE Full_Name LIKE "Comercios/_pticas"
The Full_Name it should be matching has:
Comercios/Ópticas
Any ideas why this wouldn't...
Ah nice - I will have to give that a go :) I've typed "time" in by accident (when meaning to do "date") in command prompt, but never thought to try it in front of a command I'm running :)
Thanks!
Andy
Hi,
I've got a REALLY annoying issue here. Basically, I have 2 sites (very similar setups, but different domains and different content). Here is my setup (this is using a WHMS, with cPanel... so I have to edit the pre_virtualhost_global.conf file, so my changes dont get overwritten)...
Never mind - found it. Someone someone got a lat/lng value with commas into the system. We have new checks for that now, so they must have got in some time before that
Hi,
Ah, I never knew that. I always assumed that it was just the time elapsed since the start of the process. Thanks for clearing that up :)
The "time" feature... thats to be used when running something? ie. I would just add "time" in front of my command?
Cheers
Andy
Hi,
I've got a bit of a weird issue here. I'm running a script (which takes a while to run), but it always gives me the wrong runtime for the process. See this:
chambr22 28223 52.8 0.5 53372 45744 pts/0 R+ 10:34 28:44 perl nph-build-custom.cgi
..yet the time at the moment, is:
Sat...
Hi,
I'm trying to get a URL such as:
http://www.site.com/cgi-bin/search.cgi?query=;sb=Sponsored_c;so=DESC;mh=25;Type=x;Options=foo-bar;nh=11
...to goto:
http://www.site.com/collections/foo-bar/
I'm using this line as a test:
RewriteCond %{QUERY_STRING}...
Mmm interesting - If I use USE INDEX it seems quite a bit quicker:
SELECT * FROM glinks_Links USE INDEX (Options_2) WHERE (Options LIKE '%30 minute meals%' AND Type = 'Recipe' AND isValidated = 'Yes') ORDER BY Sponsored_c DESC LIMIT 0, 25;
...now only 0.035 seconds. A "USE INDEX" isn't ideal...
Hi,
I'm trying to do some optimizing of the tables, and I found this query which is taking 0.15 seconds to run:
SELECT *
FROM glinks_Links
WHERE (
Options LIKE '%30 minute meals%'
AND Type = 'Recipe'
AND isValidated = 'Yes'
)
ORDER BY Sponsored_c DESC
LIMIT 0 , 25
The table is reasonbly large...
Aaaah ok - thanks ... will work on adding some more sample data :)
(we are gonna have a look at using Solr/Lucine for the searches, as I've used it in past projects to very good effect, but its a bugger to configure!)
Thanks again
Andy
Hi,
Thanks for the reply :) There are only 10 records in there ATM (just sample data). Probably 4 or 5 of them match the criteria in some way or another (some have some of the keywords in "title", others in "keywords", others in both... but they don't all necessarily have them in ALL the...
Mmm still having fun and games with this :(
SELECT Title,Keywords,Description,MATCH(Keywords,Title,Description) AGAINST ('+mascot +logo') AS score
FROM glinks_Links
WHERE
MATCH (Keywords,Title,Description) AGAINST ('+mascot +logo' IN BOOLEAN MODE)
LIMIT 25
...gives me results... but score is...
Hi,
This is driving me up the wall. I bet its something stupidly simple - but I'm not seeing it :(
SELECT * , MATCH (Keywords) AGAINST ('mascot') AS score
FROM glinks_Links
WHERE MATCH (Keywords) AGAINST ('mascot')
ORDER BY score
LIMIT 25
...yet it gives no results. Here is an example of...
...getElementsByClass(searchClass,node) {
if ( node == null )
node = document;
var classElements = [],
els = node.getElementsByTagName("*"),
elsLen = els.length,
pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"), i, j;
for (i = 0, j = 0; i < elsLen; i++) {
if (...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.