Opened 15 months ago
Closed 9 months ago
#20053 closed defect (bug) (worksforme)
Slug is case-sensitive for pages, but not for posts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Canonical | Version: | 3.3.1 |
| Severity: | normal | Keywords: | reporter-feedback close |
| Cc: |
Description (last modified by scribu)
hello,
if i have a page(not post) on my site (named "WORD"),
i want the function to understand that value.
i use
$var = word; ///not a double quotation; $var = strtoupper($var); $_GET['page_id']=$var;
but it doesn't work. if my site has a page "word" (with lowercase), than the function works. but i want
to get the uppercase value. i need this..
strtoupper(word); gives you = WORD, but the whole function, which has $_GET['page_id']=strtoupper(word);
can't find the page named mysite.com/WORD, but it searches again for the page mystie.com/word" (with lowercase).
everything works well for posts, but i want for pages..
Change History (8)
- Component changed from Charset to Canonical
- Summary changed from Problem with Pages (not posts) to Slug is case-sensitive for pages, but not for posts
comment:3
in reply to:
↑ 2
;
follow-up:
↓ 5
solarissmoke — 15 months ago
So, what you're saying is that for posts, the slug is case-insensitive, but it's not for pages.
It's case-insensitive everywhere for me. Visiting /wp/PAGESLUG and /wp/pageslug gives me the same thing.
comment:5
in reply to:
↑ 3
SergeyBiryukov — 15 months ago
Replying to solarissmoke:
It's case-insensitive everywhere for me. Visiting /wp/PAGESLUG and /wp/pageslug gives me the same thing.
Same for me. I don't quite get the code samples here. page_id is supposed to be a number, not a word.
comment:6
shopandstore — 15 months ago
Well, for you it's may be of no mean, but i use UPPER chars in the page parmalinks,so i don't want to redirect from
/wp/PAGESLUG to /wp/pageslug, because i have different content on each page.
- Keywords close added
but i use UPPER chars in the page parmalinks,so i don't want to redirect from /wp/PAGESLUG to /wp/pageslug, because i have different content on each page.
WordPress doesn't allow you to make uppercase page slugs, as a result, you'll never have the url /wp/PAGESLUG/. Due to the case-insensitivities of certain parts of the storage system, You can't have a slug PAGESLUG and a pageslug either.
I do note that Canonical doesn't seem to redirect on uppercase url's though (for pages at least)

So, what you're saying is that for posts, the slug is case-insensitive, but it's not for pages.