I’m trying to make a user-friendly author page url for my wp site. Currently what I have done is I have created a folder by name author
under my root theme folder and I have put my author page mark-up file(index.php
) inside this folder.
I also have a plugin ‘Easy url rewrite‘ which I’m using to make www.sitename.com/author
request to load <theme dir>/author/index.php
file. And it is working fine.
Now I want any www.sitename.com/author/<anyname>
also to load my index.php
file.
Can I achieve this using .htaccess rules? Does .htaccess rule conflict with my url-rewrite plugin?(which one will be executed first?) Can I achieve this whole thing using only .htaccess rules(ie., without the use of plugin rewrite) If so, What rules do I need to write in .htaccess file?
Thanks! Greatly appreciate your help.
yes, probably.
The htaccess rules get executed first, but that’s part of how wordpress works. There are rules that essentially send everything to wordpress’ controller and then wordpress handles it from there.
It depends. Is your page generated by wordpress or is it just a page by itself separate from wordpress? If it’s the former, you’re going to need to work on some more easy url rewrite rules, if the author page is separate from wordpress then you can do this entirely with htaccess.
If that’s the case, I’d guess the rules would look something like:
Those rules need to be before any wordpress rules that you have in the htaccess file in your document root.