Wordpress Discussion
Wordpress Discussion
Out of context: Reply #129
- Started
- Last post
- 164 Responses
- dbloc1
OK more of a PHP question, but
if my page contains a variable such as.
https://www.coolwebsite.com/cool…
is there a way to rewrite the URL string to
https://www.coolwebsite.com/cool…and then make it the 10 readable as a variable when you return to the page
- Trying to keep from having to make a new wordpress page for each new itemdbloc
- Make the URL a variable and then parse out the number in PHP ... "hey grab the number after the = sign". Then reconstruct a fresh URL with that.Centigrade
- but coming back to that reconstructed URL is a problem because there is no page for that in wordpress, right?dbloc
- I know it has to be done in htacess, I just can find the right contextdbloc
- /cool-factor/?coolfa...
needs to change to
/cool-factor/10
then when you return it's not a 404dbloc - that's a GET param redirect.
it isn't works because of the permalink structure.sted - https://www.cool website.co m/c ool-fa ctor /?co olf actor=10
is actually: index.p hp? p=35 1651&co olf acto r=10sted - this is what you're dealing with:
https://developer.wo…
that /
https://codex.wordpr…sted - 2nd link again:
https://codex.wordpr…sted - OK I think I'm close. here's what I'm trying to do. I put the functions code in the CSS box on codepen. take a look.
https://codepen.io/k…dbloc