Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#3934 closed defect (bug) (worksforme)

prev/next links and redirected domains

Reported by: davidmwilliams Owned by: westi
Milestone: Priority: lowest
Severity: trivial Version:
Component: General Keywords:
Focuses: Cc:


Fundamentally, I have a domain ( which redirects via DNS to my ISP web space ( I set the WordPress URI to and the Blog address to - both are the same.

This works, in that WordPress shows links for posts, categories, pages, etc in the format I want, namely

HOWEVER the previous and next page links at the bottom of the page are showing wrongly as (and, of course, these are invalid addresses).

I can't understand why the 'davidmwilliams' part is being added like that. It seems the next/prev page links are working out the address by a mixture of the blog address and the physical underlying directory. I am surmising it uses different code to generate the link than as used for posts, categories, etc.

I originally submitted this as ticket 3933 ( but that was prematurely closed. I do NOT believe the bug report should be closed. Unfortunately I do not have the authority level to append to tickets so I have no choice but to create a new one.

Responding to the comment by the premature closer: If I change the blog address then the links work in that they generate accurate links. However, they are no longer in the desired format - i.e. all page headings and all links show as rather than

Please understand, what I am trying to do is not obscure nor unreasonable nor ridiculous nor outlandish.

Let me restate the problem:

  • The blog address is
  • is a valid domain
  • is redirected via DNS to
  • ALL page and category links are generated by WordPress as as expected and as desired
  • The prev and next links do NOT display in that format; they show as and hence refer to non-existant pages

The implications of this are:

  • the prev/next link code is different to the code to generate links elsewhere
  • the prev/next link code is itself determining the underlying page address and is not respecting the blog address that has been specified

I believe this is a bug. Even if others feel what I am doing is somehow "strange" I am sure it can be appreciated that the prev/next link code is not consistent with other link code, and that in itself is a reason for wanting some tidying.

Change History (12)

#1 in reply to: ↑ description @JeremyVisser
15 years ago

Replying to davidmwilliams:

Unfortunately I do not have the authority level to append to tickets so I have no choice but to create a new one.

Since when?

#2 @JeremyVisser
15 years ago

Can you please not use Trac? Your previous ticket has been closed by the resident WordPress bug guru, so you should discuss it on the mailing list or forums.

#3 @davidmwilliams
15 years ago

Well, the trac site said I did not have the authority but yet allowed a new ticket to be opened.

If the person who closed the ticket is a "bug guru" then I am grossly disappointed by what passes as a guru. Indeed, I am really very surprised by how very friendly WordPress users and maintainers are until the point of asking questions about the software; I've found the responses to be aggressive and offensive. I am quite surprised.

If anyone seriously believes this is not a bug then I would be keen to know why. I do not believe it is sufficient to say "here's a bodgy workaround".

After all, it is quite evident that the code to generate prev/next links is working differently to the code which generates the page and category links - and they DO work in the way I would expect.

#4 @davidmwilliams
15 years ago

Let me ask this:

If I specify the blog address to be but the software produces links - in just one area only, not in others - of the form - is that not a bug?

#5 @davidmwilliams
15 years ago

Dudes, leave it with me.

I think WordPress is a great app. I'm a bit disappointed with the attitudes I've received by having the audacity to say I've experienced a problem.

I'll delve into the source code and work this out. I'll post my findings here for your consideration.

#6 @westi
15 years ago

  • Keywords reporter-feedback added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

I'm not sure which template functions you are talking about here.

I think you are talking about the post page links from next_posts/next_posts_link and previous_posts/previous_posts_link these use get_pagenum_link which is probably where we need to fix this issue.

Can you give more info / confirm this?

#7 @davidmwilliams
15 years ago

Thanks, westi, for the extremely helpful starting point !!

I will check those functions and get back to you soon. Much appreciated.

#8 @westi
15 years ago

See also #3930 for some improvements to get_pagenum_link which may help.

#9 @davidmwilliams
15 years ago

Hi Westi,

Thanks for the pointer where to look. I believe you are dead right; the issue is in get_pagenum_link. In particular, I'm thinking this line: $index = $_SERVER['PHP_SELF'];

Should that line actually be trying to retrieve the specified Blog address as set in the options screen?

#10 @rob1n
15 years ago

  • Component changed from Administration to General
  • Milestone changed from 2.3 to 2.4
  • Priority changed from low to lowest
  • Severity changed from normal to trivial

#11 follow-up: @Nazgul
14 years ago

  • Keywords reporter-feedback removed

Is this still a problem after #3930 was fixed?

#12 in reply to: ↑ 11 @lloydbudd
14 years ago

  • Milestone 2.4 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

Replying to Nazgul:

Is this still a problem after #3930 was fixed?

No response from bug reporter, closing as works for me w/o verification.

Note: See TracTickets for help on using tickets.