Hey, I'm running into a bit of a bind here. I have a page that functions as a dictionary of terms, with the main page linking to the letters A-Z (to show words that begin with each letter). If possible, I'd like the URLs to look as such: mysite.com/dictionary/ (main index) mysite.com/dictionary/a/ mysite.com/dictionary/b/ (and so on). However, I'd like to avoid making 26 pages for this purpose (especially when there might be multiple such indexes), so I was hoping that the main page (/dictionary/) could actually send a variable in the URL such that "/dictionary/a/" would actually load the "/dictionary/" page but with "a" as a PHP variable. Other solutions would be alright, if that wasn't possible, but I need it to be SEO friendly . Thanks so much for the help! - Submerged
Yes, you can do that trough .htaccess file. Just make the .htaccess rule that when he see /directory/a/ to translate it into /directory/?term=a
Thanks for the reply, thedark . I managed to get WP set up to take a variable ('myvar') through the URL, so I need Apache to translate: /review/reference/vocabulary/by-alphabet/(a letter here)/ into: /review/reference/vocabulary/by-alphabet/?myvar=(the letter here) Then my WP will take it from there. I tried this code, but it doesn't seem to work: RewriteRule ^/review/reference/vocabulary/by-alphabet/([a-z])/?$ /review/reference/vocabulary/by-alphabet/?myvar=$1 [NC,L] I'm quite inexperienced at Apache, any help would be great . Thanks!
I've been Googling it for an hour or two, I can't seem to get it to work. I've tried these: RewriteRule ^/review/reference/vocabulary/by-alphabet/([a-z])/?$ /review/reference/vocabulary/by-alphabet/?myvar=$1 [NC,L] RewriteRule ^review/reference/vocabulary/by-alphabet/([a-z]+)/ review/reference/vocabulary/by-alphabet/?myvar=$1 [NC] I've read multiple sites, but I'm at loss here. I've never used Apache. Could someone who knows Apache better just look at those? I'm assuming it's just a small typo of some kind or another . Thanks!