WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 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:

Description

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)

comment:1 Viper007Bond7 years ago

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

Works for me.

http://www.viper007bond.com/index.php?page_id=43

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.

comment:2 santosj7 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.

comment:3 tjz7 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.

comment:4 tjz7 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

comment:5 santosj7 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

comment:6 Viper007Bond7 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

comment:7 Viper007Bond7 years ago

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

Note: See TracTickets for help on using tickets.