httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Gingras <thu...@apache.org>
Subject Re: [users@httpd] E-commerce Rewrite Rule
Date Thu, 15 Feb 2018 05:12:28 GMT
To add to the last response, consider using FallbackResource too, or
multiviews if the paths can be translated directly to a file.

On Wed, Feb 14, 2018 at 2:50 PM, Richard <lists-apache@listmail.innovate.net
> wrote:

> You seem to be making the "urls" that the client gets unnecessarily
> complex which results in rewrite rules that are wasteful and ripe for
> errors. You might want to reconsider the urls that you are presenting
> to the client, making them more precise so that the rewrite rules can
> be cleaner, or in many cases unneeded.
>
> Needing a rewrite for a basic "contact-us" seems to be a bit of
> overkill (aka, perpetual employment coding).
>
>
>
> > Date: Wednesday, February 14, 2018 07:46:14 -0500
> > From: Frank Gingras <thumbs@apache.org>
> >
> > Be wary of such blanket answers. When used in the per directory
> > context (Directory block or .htaccess file), the leading slash is
> > stripped before the rewrite rule is evaluated.
> >
> > Consider using the rewrite log to see what is happening.
> >
> > On Wed, Feb 14, 2018 at 4:38 AM, <stefaan.dutry@roularta.be> wrote:
> >
> >> The regex groups count from left to right,
> >> Also the paths start with a /
> >> So the rule should be something like:
> >>
> >> RewriteRule
> >> ^/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/
> >> ?$ php-page-name.php?dept=$1&maincat=$2&subcat=$3&product=$4 [L]
> >> -------------------------------------
> >> Van: Rajib Karmakar [mailto:creativeweblogo@gmail.com]
> >> Verzonden: woensdag 14 februari 2018 9:59
> >> Aan: users@httpd.apache.org
> >> Onderwerp: Re: [users@httpd] E-commerce Rewrite Rule
> >>
> >> Hello,
> >>
> >> I build is it right?
> >>
> >> 3. domain.com / Clothing[Department] / Mens[Main Catagory] /
> >> Shirts[Sub Catagory] / White Shirt [product_id=15] => RewriteRule
> >> ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$
> >> php-page-name.php?dept=$4&maincat=$3&subcat=$2&product=$1 [L]
> >>
> >> 4. domain.com / contact-us => RewriteRule ^contact/?$
> >> contact-us.php [L]
> >>
> >>
> >>
> >> Sincerely
> >> ---------------------------------------------------------
> >> Rajib Karmakar
> >>
> >> Creative Web Logo Technologies
> >> Website: http://www.creativeweblogo.com
> >> Mobile: +919874704940
> >> Skype: creative.web.logo
> >> © 2008-2018 Creative Web Logo Technologies.
> >>
> >> On Tue, Feb 13, 2018 at 8:53 PM, Rajib Karmakar
> >> <creativeweblogo@gmail.com> wrote:
> >> Hello,
> >>
> >> Yes, I need  4 URL to mod_rewrite.
> >>
> >>
> >> Sincerely
> >> ---------------------------------------------------------
> >> Rajib Karmakar
> >>
> >> Creative Web Logo Technologies
> >> Website: http://www.creativeweblogo.com
> >> Mobile: +919874704940
> >> Skype: creative.web.logo
> >> © 2008-2018 Creative Web Logo Technologies.
> >>
> >> On Tue, Feb 13, 2018 at 7:51 PM, Eric Covener <covener@gmail.com>
> >> wrote: On Tue, Feb 13, 2018 at 8:57 AM, Rajib Karmakar
> >> <creativeweblogo@gmail.com> wrote:
> >> > Good morning Team,
> >> >
> >> >
> >> > Below 4 URL in my e-commerce, please guide me right rewriterule
> >> > for it.
> >> >
> >> >
> >> >
> >> > 1. domain.com / Clothing[Department] / Mens[Main Catagory] /
> >> > Shirts[Sub Catagory] / T-Shirts [Sub Sub Catagory] / White Shirt
> >> > [product_id=15]
> >> >
> >> >
> >> > 2. domain.com / Mens[Main Catagory] / Shirts[Sub Catagory] /
> >> > T-Shirts
> >> [Sub
> >> > Sub Catagory] / White Shirt [product_id=15]
> >> >
> >> >
> >> > 3. domain.com / Clothing[Department] / Mens[Main Catagory] /
> >> > Shirts[Sub Catagory] / White Shirt [product_id=15]
> >> >
> >> >
> >> > 4. domain.com / contact-us
> >> >
> >>
> >> What's the question? What have you tried?  Normally a question
> >> about mod_rewrite would involve a "to" and "from" URL.
> >>
> >> ------------------------------------------------------------------
> >> --- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For
> >> additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >>
>
> ------------ End Original Message ------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message