views:

62

answers:

1

If I upload a file foo.pdf to WordPress I can access it at http://example.com/foo/. (There is a simple HTML page with a link to the PDF file).

If I then create a Page named foo I cannot view or preview the Page because the default URL, http://example.com/foo/, will resolve to the page for the PDF.

How can I resolve this URL conflict?

+2  A: 

If I remember correctly, WordPress's URL redirection uses the -f flag, so it applies the "nice URL" rule only if the requested file doesn't exist. I think you could say that is the proper behaviour.

The easiest way would be storing the PDF elsewhere, for example in the /wp-content directory that is exempt from URL rewriting. Is that not an option?

Pekka
The PDF is in `wp-content/uploads` but WordPress creates a page at `http://example.com/foo/` which has a link to the PDF.
Liam
@Liam so this is an internal WordPress conflict? Or are you using a plug-in for the uploads?
Pekka
Yes, it is a very basic installation, no plugins. v2.9.2
Liam