Custom taxonomy returns 404

You cannot have a rewrite slug of “https://wordpress.stackexchange.com/”. Note that using a slug of ”, which you will find floating around, will not work for the latest WordPress versions either. If you want a url like http://domain.com/custom-post, there are no bullet-proof solutions, but the answer to this question will give you some leads: Remove slug … Read more

Unable to get /%postname%/ permalinks working, 404 on all links

This is going to sound crazy, but the following worked… I put the content in the following directory: /var/www/myexamplesite.com/public_html (and created log/ as well) Along with the following entry in httpd.conf <VirtualHost *:80> ServerAlias www.myexamplesite.com myexamplesite.com DocumentRoot /var/www/myexamplesite.com/public_html ServerName www.myexamplesite.com # Log file locations LogLevel warn ErrorLog /var/www/myexamplesite.com/log/error.log CustomLog /var/www/myexamplesite.com/log/access.log combined <Directory /var/www/myexamplesite.com/public_html> <IfModule mod_rewrite.c> … Read more

Post Type rewrite rule to point to custom Page/template

I really don’t know why it’s doing this redirect, but i fixed this by changing the post_type&name $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?post_type=page&name=lessonhome&home=yes’; to page_id: $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?page_id=24&home=yes’; or to pagename: $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?pagename=lessonhome&home=yes’; and it’s working fine!

Rewrite URL based on home_url

It looks like you want to redirect: http://example.com/18/profile to http://example.com/seller?page=profile If so, add the following to your .htaccess file in between the <IfModule mod_rewrite.c> tags that were created by WordPress: RewriteCond %{HTTP_HOST} RewriteRule ^18/profile/?$ seller?page=profile [R=301] Your .htaccess should looks like the following if it hasn’t been modified by another plugin: # BEGIN WordPress <IfModule … Read more

Redirecting /px/?q=x to /px/x/

In your .htaccess add the following rule in between the <IfModule mod_rewrite.c> tag: RewriteCond %{QUERY_STRING} ^q=(.*)$ [NC] RewriteRule ^/?px/(.*)$ px/%1? [L,R=301] Based off of the default .htaccess generated by WordPress, it should now look like the following with your custom RewriteRule: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond … Read more