So, I have a pseudo regional site working with MIGxdb to customize output via custom CMP, accessed with the getURLParam snippet. Its working as intended - kudos Bruno, wonderful plugin and Susan for recommending it!. Now my goal is that instead of www.mysite.com/index.php?id=1&name=Austin (which works) it's instead www.mysite.com/Austin.
Turning on FURLs gets me as far as www.mysite.com/?name=Austin
So, question is can this be accomplished with just a RewriteRule? Or does the FURL logic get in the way?
-
☆ A M B ☆
- 24,524 Posts
This is a two-part issue. The .htaccess part is easy enough, rewriting the /Austin part to be a query string for MODX to deal with. The tricky part is getting MODX to generate the URL in the first place. I know it can be done, and has been done, but that's as far as I can go.
Actually, with a plugin using OnPageNotFound, you can parse the URL and get what you want out of it without bothering the .htaccess file at all.
Won't getURLParam fail without the proper query string?
-
☆ A M B ☆
- 24,524 Posts
You wouldn't be able to use getURLParam. You would have to strip off the last part of the URL string to use as the alias.
Easy enough if there's only one parameter: