I broke my Wordpress permalinks. HELP!
October 28, 2009 10:23 PM   Subscribe

I'm getting 'double' links in my Wordpress theme after I changed the way it handles Permalinks. And now I can't change it. More inside.

So, previously I had my permalinks set to default: domain.com/?p=xx

I decided to play with it a little bit and I tried changing it. It started giving me 'double links'. I changed it back to default and I'm STILL getting 'double links'. This happened on my production server and my local test server.

Here's what they look like now: domain.com/'domain.com/?p=xx'

Even I move it back to default, it's stuck this way. Is this an .htaccess issue? I'm not sure what a 'healthy' .htaccess should look like. Has anyone else had this problem? I'm going nutty and I can't seem to find anyone else who has run into this.

I know this issue can crop up if you don't fully format a URL, but I don't think that's what happening. Permalinks come from the <> in The Loop. Links generated elsewhere (Archives, etc.) are fine.


Thoughts?
posted by GilloD to Technology (3 answers total)
 
Response by poster: Whoops. Bad formatting. Try: "Permalinks come from the <> in The Loop"
posted by GilloD at 10:24 PM on October 28, 2009


Response by poster: Okay, this is embarassing. They come from the the_permalink() function in The Loop.
posted by GilloD at 10:25 PM on October 28, 2009


domain.com/'domain.com/?p=xx'

Is that exactly what they look like? They have single-quotes just like that? I would suspect that the single-quotes are getting inserted somewhere, either in your HTML template (e.g. if you wrote href="'permalink'" with both kinds of quotes), your PHP code (if the string returned from the_permalink contained the single quotes), or your htaccess file (if you included the quotes in your redirect destination). Also, shouldn't there be at least one "http://" prefix in there?

I doubt anyone can guess what happened without knowing what code you changed, and what it looks like now. Can you tell us what's in your htaccess file and in any templates or functions you edited? It ought to be straightforward to trace the URI backward through the system and figure out where it's being mangled.
posted by mbrubeck at 9:20 AM on October 29, 2009


« Older Bring Me Your Purple Unicorns   |   What job is this? Can I make a living with this? Newer »
This thread is closed to new comments.