I looked around, but to be honest, I'm not sure what I should look for in order to get more demanding results. Hell, I'm fighting url versus uri versus page versus link, and what is and is not. And the MOD_REWRITE manuals seem to be written for people well versed in Apache or Unix, or something else, especially when none of them explain or analyze examples of what each “programming” symbol does or means. Here and through Google, I don't seem to get anything I want in the top 25 search results I tried, encompassing the concept ...
Well, what I'm trying to do is replace the URL wildcards that depend on three variables, while preserving the other bits. Is this possible with mod_rewrite?
for instance
Three requested URLs:
http://mydomain.com/WORDS-AND-DASHES-c-NUMBERS_WITH_UNDERSCORES
http://mydomain.com/WORDS-AND-DASHES-m-NUMBERS_WITH_UNDERSCORES
http://mydomain.com/WORDS-AND-DASHES-p-NUMBERS_WITH_UNDERSCORES
Rewritten URLs, respectively, should be:
http://mydomain.com/index.php?index&categories_id=NUMBERS_WITH_UNDERSCORES
http://mydomain.com/index.php?main_page=index&mfrs_id=NUMBERS_WITH_UNDERSCORES
http://mydomain.com/index.php?main_page=index&products_id=NUMBERS_WITH_UNDERSCORES
WORD AND-DASHES will vary in content and length from page to page, like NUMBERS_WITH_UNDERSCORES. The only constants are the domain and three link type identifiers, -c-, -n- and -p-. I-DASHWORDS are replaced with a variable depending on the type of link that is excluded, and NUMBERS_WITH_UNDERSCORES remain in the new URL.
IOW, if the url contains "-c-", then I want to replace everything between the domain and "-c-" with "index.php? Index & category_id =", delete the "-c-" part and save NUMBERS_WITH_UNDERSCORES. Perhaps only a number follows like -c-, -m- or -p-.
If I knew PHP, maybe this is possible, but I won’t do it, and I hope that mod_write will be as powerful as I think it should be. If several variables are required for each variable, I'm fine too. Performing triple work is even better than 10,000+ times.
FWIW, during the update, it was discovered that the old URL rewriting module was stopping, so I am trying to quickly rebuild .htaccess and sitemap.xml for search engines and all dead links in their respective results.
... again, I could bark Mangled Metaphorbial Creek.
Thank you for any knowledge, guidance and / or advice that you share.
-BC