Monday, August 6, 2018

Error adding the same .htaccess rule more than once?

Leave a Comment

I have the following rule that allows me to create, multiple categories, in the URL, without needing to write the categories in my .htaccess, for example: RewriteRule ^ global / (...

I do it directly from the following rule:

RewriteRule ^(.*)/([^/]+/?)$ product.php?id=$2&categories=$1 RewriteRule ^(.*)/([^/]+/?)$ product_one.php?id=$2&categories=$1 

With my rule I can have a number of categories in the URL, for example:

example.com/category/gloabl/others/plus/my-url-article-post/ 

Now my problem is, that I have individual product details, created by individual files product.php, product_one.php among others.

Which only works one of the .htaccess rules, that is, I have to deactivate # one of them, so that the details of the products in the detail.php file show the details and to show the detail of the file detail_one.php I have to disable the .htaccess rule in the detail.php file

How can I do to keep the same design of multiple categories, but that the same rule allows me to add more than one, for the different news details?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment