Forum Moderators: phranque
but i have realy no idea how to do it...
If(no ‘.’ or ‘?’ or ‘&’ or ‘=’ in url after last ‘/’){
[127.0.0.1...] →
[127.0.0.1...]
}
in this script "moeder" could be changed in anything else, and will be rewritten after "?page=display&book=", unless it contains a ‘.’ or ‘?’ etc.
so if i use:
[127.0.0.1...]
the script will not try to redirect that to
[127.0.0.1...]
i hope someone can help me out
most sincerly
jelle van oosten
Welcome to WebmasterWorld!
You could try something like this:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_URI} !\.[^/]*$
RewriteRule ^tryout/(.+) /tryout?page=display&book=$1
What you need to know:
In Apache, query strings are handled separately from URLs. That is, anything after a "?" is stored and handled in the server variable %{QUERY_STRING) and will not be visible to RewriteRule.
For this reason, it is only necessary to check for "." followed by anything but "/" in the URL itself -- the "=" and "&" characters will all be placed in the %{QUERY_STRING) variable, and the "?" is removed; It appears in neither the local URL-path nor the %{QUERY_STRING)
I hope I understood your question. If so, then that above code wshould work with a few minor tweaks.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim