1 richard_gekko Jul 04, 2006 17:47
3 richard_gekko Jul 05, 2006 10:41
Already in use extra path info. It works very well for post permalink. But what I want is clear URL for serching query: index.php?s=whateveryouwant&sentence=sentence
4 village_idiot Jul 05, 2006 11:56
buahhaa, I can prolly help.. ermm maybe, paste what your mod_rewrite stuff look like right now.. I have cruft free urls for searches, but then.. i'm me!
5 richard_gekko Jul 05, 2006 12:05
my mod_rewrite
RewriteEngine on
RewriteRule ^/not_found.html ^/errore_404.php [R=permanent]
RewriteCond %{HTTP_REFERER} "!^http://richardgekko.altervista.org/.*$" [NC]
RewriteCond %{REQUEST_URI} ".*comment_post.php$"
RewriteRule .* - [F]
6 village_idiot Jul 05, 2006 12:42
mm. thats right, b2evo handles cruft free links without doing the mod_rewrite thing..
well you can try just using this:
RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]
might work, might not... we'll see
7 richard_gekko Jul 06, 2006 08:38
eureka!
It really works
8 richard_gekko Jul 06, 2006 16:01
RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]
How can I modify this rule to prevent that
http://www.village-idiot.org/search/b2evolution/
become
9 village_idiot Jul 06, 2006 22:37
do what now? you want to go the other way?
Give me an example on your site, not mine, much easier :) mine works, I want to see something that doesnt work :P
I know what you want to do, I think.. and its a waste of time.
http://www.village-idiot.org/index.php?s=b2evolution/ <-- you want that be unaccessable, ie, use mod_rewrite to make it go away, right? Why? No-one will even know its there.
Unless you have urls in google showing up like that, i REALLY wouldnt worry about that. Its more hassle to redirect it than its worth.
realize that if the first rewrite I gave you works, you NEVER have to provide a link with the ?s query again, just do it the fixed way.
10 richard_gekko Jul 07, 2006 09:27
Look at this
http://www.village-idiot.org/search/b2evolution
It found a lot of post!
Instead look at this
http://www.village-idiot.org/search/b2evolution/
It found only 1 post!
That’s beacuse in the second example the value assigned to variable $1 is "b2evolution/".
How can I prevent that special characters like slash (or &) appear in the search query string?
11 personman Jul 07, 2006 17:08
How can I prevent that special characters like slash (or &) appear in the search query string?
Don't type them in the address bar! :D
12 richard_gekko Jul 07, 2006 18:07
Claro que si!
But what can I do if my hosting adds slashs automatically at the end of urls for the incoming traffic?
Click the link in [url=http://www.bruttastoria.it/HTMLPage1.htm]this page[/url] to see my server behaviour.
13 personman Jul 07, 2006 18:14
http://richardgekko.altervista.org/search/cantante is not getting a slash added to it now. Did you fix it?
14 richard_gekko Jul 07, 2006 18:37
NO!
Now I clicked http://richardgekko.altervista.org/search/cantante and the server responded so
http://home.altervista.org/site/split.php?http://richardgekko.altervista.org/search/cantante
Not Found
The requested URL /site/split.php was not found on this server.
--------------------------------------------------------------------------------
Apache/1.3.34 Server at home.altervista.org Port 80
Damn free hosting!
15 village_idiot Jul 08, 2006 03:21
it looks fine to me from here.. outside of your free hosting thing. I would leave it just like it is, richard. it works, and no-one will be the wiser about the other ..
16 richard_gekko Aug 13, 2006 20:19
HI GUYS!
I've just upgraded my b2evo from 0.9.0.11 to 0.9.2
Very nice but there's a problem:
RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]
do not work anymore...
If I follow this link http://richardgekko.altervista.org/search/cantante my new version of b2evo get to _404_not_found.page.php where I read
404 Not Found
b2evolution cannot resolve the requested URL.
So I opened my _blog_main.php and commented the line 164
like that //$path_error = 404;
and now the URL http://richardgekko.altervista.org/search/cantante gets all the post that contains "cantante".
Is there any other way to do this without cut out Extra path info decoding control?
On your settings tab click the "Use extra path info" box, and you REALLY should upgrade your blog to 0.9.2. 0.9.0.10 is very very old.