Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite

have something but not complete yet

         

Istvan

12:26 pm on Jan 20, 2004 (gmt 0)

10+ Year Member



At the moment I have the following urls:
[somewidgetdomain.com...]

now I would like to rewrite this to:
[somewidgetdomain.com...]

As I understood it when the apache server rewrites it, the searchengine spiders see redwidgets.htm and are able to index it, right?

After looking to other threads, I came up with the following:

RewriteEngine on
RewriteBase /mod
RewriteRule ^/widgets/shopping/(.*)\.html$ /place_widgetpage.cgi?recnr_group=$1&group=redwidget [L]

Only at most of the examples I only saw a string like: place_widgetpage.cgi?recnr_group=55 but at my site it places &group=redwidget behind it. Is there a way that I can put this extra thing in the RewriteRule?

Istvan

RonPK

2:04 pm on Jan 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RewriteRule ^/widgets/shopping/(.*)\.html$ /place_widgetpage.cgi?recnr_group=$1&group=redwidget

The $1 is a reference to whatever there is between ( and ) in the first part of the rule.

In the pretty URL there is no 55, so it will be hard to rewrite the URL into some query with 55.

I hope this helps...