Forum Moderators: phranque
Here is the URL that I have now:
[widgets.com...]
or
[widgets.com...]
or
[widgets.com...]
Is there a way to use ModRewrite to make them look something like this (with no "?" or "&" or "=" signs):
[widgets.com...]
I have seen some on this board talking about being able to do this, but all the guides that I have seen are like readiing greek. There must be a clear and concise explanation somewhere. Does anyone know how to do this? Can you show me?
Burke
Yes there is a way to do this. The key is to use the "not member of set" notation of regular expressions to parse out the script arguments. Specifically, that notation would be [^?&=].
There is no shortcut to learning mod_rewrite and regular expressions, and we would do you no favor by giving you a solution which may or may not work for you, while taking no steps to help you learn how to fix the problems.
Have a good read of this Introduction to mod_rewrite [webmasterworld.com] post, and follow and read the cited reference material. Then start with a simple example and work through it.
Another point is that mod_rewrite action takes place between the browser's request and the access to actual files on your server. Therefore, I suspect that you actually want to rewrite from a user-and-spider-friendly URL like this:
[widgets.com...]
to a URL usable by your scripts, like this:
[widgets.com...]
Your scripts will then be called with the argumants they expect, but must be modified to output user-friendly URLs if you wish the browsers/spiders to use those.
If you have a specific problem with a particular mod_rewrite you are testing, we will be glad to help!
HTH,
Jim