Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5098 closed defect (bug) (invalid)

Relative links don't work when permalinks activated

Reported by: tjz Owned by:
Milestone: Priority: high
Severity: major Version: 2.3
Component: General Keywords:
Focuses: Cc:


Only tried with page links created as

<a href="index.php?page_id=42">Page title</a>

as described on http://codex.wordpress.org/Linking_Posts_Pages_and_Categories seeing as they should work whether or not permalinks are activated, but I get 404 errors when linking to a page_id.

Change History (7)

#1 @Viper007Bond
11 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Works for me.


Reopen this ticket if you'd like, but you'll need to provide more details (for example, the URL to your site). I suspect though this is just some configuration issue on your end though, so I'd suggest your first use the support forums.

#2 @santosj
11 years ago

The user is talking about when they go to a inner page using permalinks, the relative path will fail. This is normal behavior of HTML linking.

The user needs to use absolute paths (without domain) or the permalink functions to get the true link to the page when permalinks are turned on and off.

#3 @tjz
11 years ago

Exactly what santosj said.

If you have a page with nice permalinks, in the form of URL/page-name/ and it contains a link to index.php?page_id=12, the page_id for a different page, it will fail because the link the user ends up with on a page is URL/page-name/index.php?page_id=12, which doesn't go via the .htaccess of URL/ and therefore is never processed by Wordpress as an internal link.

#4 @tjz
11 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#5 @santosj
11 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Not really an WordPress issue. Try to fix the theme and add '/' before index.php

#6 @Viper007Bond
11 years ago

The user is talking about when they go to a inner page using permalinks, the relative path will fail.

I had considered that, but figured it was something deeper they were talking about. As they say -- the simplest answer is often the right one. heh

#7 @Viper007Bond
11 years ago

Whoops, meant to use quote, not code. Oh well.

Note: See TracTickets for help on using tickets.