Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Today I tried to make the Permalinks of my Wordpress site more SEO friendly. I got it working for all links, except the ones linking to a custom post type page. I Googled the problem and found out that it's a common, in my eyes not-so-easy-to-solve-type problem. That's why I wanted to use the default permalink structure again (I am still in development phase).

Now nearly all links are broken! Sometimes I get a 404, sometimes the browser itself says "page not found" - on some links, the default structure is still working. When I manually try to get to a page by entering the id manually in the brower's address bar, the address changes to the new structure, but I get a 404. You see, something is all wrong there and I don't really know how to fix it. I read about editing the .htaccess or httpd.conf (I'm in XAMPP) file, but because I don't know anything about this, I don't really want to change anything in there.

Is there any way of "resetting" all permalinks to their default format?


Edit:

Ok, according to the comments I should post the rewrite rules. Problem: I don't even know what exactly to post from there!

Plus one funny thing happened: I set the Permalink structure to /%postname again (since I am in 3.3.1 this should be alright I guess) and now it is working again. Only one link (the link to the custom-post type) is still ugly. So now I am in the same state as a few hours ago - although I still don't understand what is going on.

When everything is correct, a URL looks like this:

http://www.example.com/kitchen

But for a custom post type, the URL looks like this:

http://www.example.com/?food=food

or when I visited

http://www.example.com/kitchen

before that:

http://www.example.com/kitchen?food=food

I use a the custom-post-type-ui plugin to create the post types.

Please tell me what I should copy (I mean, that's a pretty long list right now...), then I will post it, but I just don't know right know. I guess that's why I can't even precisely describe the problem above, I am sorry!


Edit:

The .htaccess looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
share|improve this question

closed as too localized by toscho Oct 9 '12 at 17:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This seems like a user-support question, maybe you should refer to wordpress.org/support –  Jared Feb 4 '12 at 15:52
2  
Show us the code that registers the custom post type. Install the Monkeyman Rewrite Analyzer and post your current rewrite rules. @Jared This question is absolutely fine here. WPSE is the best place to explore such issues. –  toscho Feb 4 '12 at 16:35
1  
I suppose you are right. Sven if you edit your question I can remove my downvote. –  Jared Feb 4 '12 at 16:44
    
I suggest that you open the .htaccess file (it will be at the root of your wordpress installation) in a text editor and add the .htaccess code to your question. –  icc97 Feb 4 '12 at 17:07
2  
@Sven Please care about formatting Qs properly. Thanks. –  kaiser Feb 4 '12 at 17:26

1 Answer 1

up vote 0 down vote accepted

There are probably more problems with your question than with WordPress. To get an insightful answer, it'd help to get us a clear idea about your setup. Don't be shy about hiding your website link and it's structure. This can help us figure it out.

To get the rewrite rules of your blog

add_action ('template_redirect', function() {
  global $wp_rewrite;
  var_dump($wp_rewrite);
});

That should help as a starting point.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.