Welcome to WebmasterWorld Guest from 54.145.58.37

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

ModRewrite Experts?

I need to rewrite this URL, can you help?

     
8:55 pm on Mar 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Oct 3, 2002
posts:37
votes: 0


I am no expert on these things, that is why I am hoping someone here might be able to help. I have a dynamic site that generates complex URL's that I would like to rewrite so that they all get spidered better by the search engines.

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

9:18 pm on Mar 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


bsnrjones,

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members