WordPress rewrite question

Here’s an endpoint solution as mentioned in my comment. First, add the endpoint by adding this code to your theme’s functions.php file: function wpa_add_rep_endpoint(){ add_rewrite_endpoint( ‘rep’, EP_ROOT ); } add_action( ‘init’, ‘wpa_add_rep_endpoint’ ); Then visit the Settings > Permalinks page in admin after adding the endpoint to flush the rewrite rules so this endpoint will … Read more

htaccess mod_rewrite not working

With some help (also asked on SO, as this wasn’t a strict WP question), and some testing, the following ended up working for me (added a slash just before the $ sign): RewriteRule ^galleries/(.*)/$ /portfolio/$1 [R=301,NC,L] As the galleries are actual directories, not files, they have a slash at the end: http://subdomain.example.com/galleries/headshots/ Here —^