Custom Rewrite for Profiles
Custom Rewrite for Profiles
Custom Rewrite for Profiles
.htaccess not working in WordPress
customize urls displayed by previous_post_link and next_post_link
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
Only homepage working correctly, 404 error on everything else
Try using this: if (!is_admin()) { add_rewrite_rule(‘([A-Za-z0-9])/([A-Za-z0-9])’, ‘index.php/product?subcategory=$1&product=$2’, ‘top’); add_rewrite_rule(‘([A-Za-z0-9])’, ‘index.php/categories/?cat=$1’, ‘top’); }
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 —^
In your .htaccess file, add this code below- Redirect 301 / http://mywebsite.com/blog/ Change mywebsite.com with your actual domain.
ModRewrite not working properly
I solved it. Apache server doesn’t allow VHosts pointing to outside /var/www. So I changed all (Document root AND Directory) to /var/www/site and it worked on all sites, with permalinks working fine.