homepage Welcome to WebmasterWorld Guest from 54.234.2.94
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
ModRewrite Experts?
I need to rewrite this URL, can you help?
bsnrjones




msg:1505675
 8:55 pm on Mar 11, 2003 (gmt 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

 

jdMorgan




msg:1505676
 9:18 pm on Mar 11, 2003 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved