RE: E-commerce Rewrite Rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx] 
Verzonden: woensdag 14 februari 2018 9:59
Aan: users@xxxxxxxxxxxxxxxx
Onderwerp: Re:  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@xxxxxxxxx> 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@xxxxxxxxx> wrote:
On Tue, Feb 13, 2018 at 8:57 AM, Rajib Karmakar
<creativeweblogo@xxxxxxxxx> 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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux