apache - Using same .htaccess in different environments -


Our website lives in three different environments to test with production

  • Http: //www.production.com /
  • Ul>

    (See examples of URLs in the following .htaccess snippet)

      Option + Rewrite on follow-up serialink reenable engine ^ Brand / (. +) /products.php?brand=$1 [ R, NC] RewriteRule ^ Product / (. +) /products.php?model=$1 [R, NC]  

    I capture the first part of the URL Please do this and include it in the .htaccess file so that the following URL behaves all:

    • http: // localhost / version / product / c20
    • //www.production.com/test/products/C20
    • http: //www.production.com/product/c20

    I watched on the Rivet candy , But I do not know how can I use it in this matter please, please feel free to, please.

Edit: It starts working:

< Re> reconciliation on pre> option + reminder rewriting engine% {REQUEST_URI} ^ (. +) / (Brand | product) / rewrite rule ^ brand / (. +)% 1 / x.php? Brand = $ 1 [nc] rewrite% {REQUEST_URI} ^ (. +) / (Brand | product) / revised rules ^ product / (. +)% 1 / x.php? Model = $ 1 [nc]

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -