Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing mod_rewrite to substitute variable used in URL
    primarykey
    data
    text
    <p>I've gone through a few different questions like: <a href="https://stackoverflow.com/questions/893218/rewrite-for-all-urls">Rewrite for all URLs</a></p> <p><a href="https://stackoverflow.com/questions/884377/can-mod-rewrite-convert-any-number-of-parameters-with-any-names">Can mod_rewrite convert any number of parameters with any names?</a></p> <p><a href="https://stackoverflow.com/questions/5845609/creating-dynamic-urls-in-htaccess">Creating dynamic URLs in htaccess</a></p> <p>Which helped me change one set of urls from domain.com/script2.php?d=1 to domain.com/(d), but now I'm stuck with something that I can't find an answer for. Currently, I have a set of URLs that are set up as: domain.com/script.php?a=1</p> <p>While I know how to change those URLs to domain.com/(a) this doesn't quite help me with this one because variable A is just a numerical identifier, so going from domain.com/script.php?products=1 to domain.com/1 doesn't do me a lot of good.</p> <p>Instead, it's variable B which is actually the descriptor, ProductName. So what I'm trying to do is have it so that rather than domain.com/(a), I can get domain.com/(b). There is a complication. The reason that the original set up used variable A is that multiple products use the same descriptor in variable B, so I also need to include variable C which differentiates them, so I need the URL to be domain.com/(b)-(c).</p> <p>Bonus! Remember how I said I had another script that I'd changed from domain.com/script2.php?d=1 to domain.com/(d)? Well, it'd be super awesome if I could set up my this current script to display not as domain.com/(b)-(c) but instead as domain.com/(d)/(b)-(c) because domain/(d) is actually the search page for this other script, so it's a really logical flow and would really simplify browsing, and would let users intuitively move between the search and the products without much work.</p> <p>I have no idea if this is even possible, but any help would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload