2 edb Jul 05, 2006 00:42

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
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!
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]
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
eureka!
It really works
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
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.
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?
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
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.
http://richardgekko.altervista.org/search/cantante is not getting a slash added to it now. Did you fix it?
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!
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 ..
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.