Opened 21 years ago
Closed 21 years ago
#892 closed defect (bug) (invalid)
Under Apache 2 pages are broken when using permalinks
| Reported by: | jatonline | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 1.5 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
Description
When WordPress is clean installed on a clean installation of Apache/2.0.52, PHP/4.3.10 and MySQL/4.1.10 on Windows XP SP2, adding any kind of Permalink structure in the admin interface breaks the 'pages' feature.
Posts work fine, however when http://site/pagename is accessed, a 404 error is received.
If permalinks are in the form:
/%category%/%postname%/
then the WP 404 page is displayed, however if permalinks are set as something like:
/archives/%year....%/%post_id%/
then an Apache 404 page is displayed.
Change History (7)
#3
@
21 years ago
Yes, I'd added
AllowOverride All
beforehand, so that's no good
All the other permalinks worked, and using Apache 1.3 with practically the same httpd.conf semeed to solve the problem
edited on: 02-16-05 11:55
#4
@
21 years ago
When I first tried permalinks under Apache 2, I could pull up the blog homepage fine, all the links inside that page were marked up with permalinks, but if you clicked on one of the links, you'd get back a 404 error code.
To resolve, I had to get Apache 2 to load the rewrite module. I did this by running, as superuser:
a2enmod rewrite
This basically adds a LoadModule directive for mod_rewrite to the apache configuration, for me inside a file called <APACHE_CONF_BASE>/mods-available/rewrite.load
After this, permalinks worked fine for me.
edited on: 03-09-05 01:26
#5
@
21 years ago
This is not a bug. It is a behaviour change in Apache and PHP when PHP is used as a filter. PATH_INFO is no longer always set. You can turn it on with the AcceptPathInfo directive in your .htaccess file or within a <Location> or <Directory>, or for your whole server.
http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo
#6
@
21 years ago
Adding AcceptPathInfo does not help I'm afraid.
It would appear that the extra rewrite rules for the page are not being added.
e.g. If pages are added under Apache/1.3 then rewrite rules are addded and pages work. If I switch to Apache/2.0 then the pages still work, however as soon as I add another page, the rewrite rules for EVERY page are removed and none work (until i switch back to Apache/1.3 and add another page, when they are all restored).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Have you enabled .htaccess overrides? These are disabled by default.
Add this to your httpd.conf:
`
<Directory /path/to/wordpress>
</Directory>
`
and restart apache.