Day and name Permalinks results in 404 error
-
Having difficulties with Permalinks in 2.7.
I have fresh installation of both 2.6.5 and 2.7 on a single domain. 2.6.5 in directory ‘wp6’ and 2.7 in directory ‘wp7’. Each on its own separate database. No plugins, themes, etc. I logged in the 2.6.5 installation, enabled permalinks, got code for the .htaccess and created the .htaccess file in the ‘wp6’ directory. 2.6.5 works great!!
I did the same thing for 2.7, except put the 2.7 .htaccess code in the ‘wp7’ directory and when I try to click on a link, it gives me “Error 404 – Not Found”.
Any thoughts as to what is going on?
-
smrtalex: could you please show me what you’ve pasted in the rewrite_rules table? i dont know if its any use, but this is what was in my rewrite_rules table
edit: actually i just removed it since its just a load of info that’s probably useless. i just realized i probably cant use the info you put in your table. oh well
This is the values from 2.6.5 that I posted in the 2.7 database. Hope it helps you! Make sure it is one line, no word wrap. ?? Let us know. Thanks!
a:63:{s:11:"robots.txt$";s:18:"index.php?robots=1";s:14:".*wp-atom.php$";s:19:"index.php?feed=atom";s:13:".*wp-rdf.php$";s:18:"index.php?feed=rdf";s:13:".*wp-rss.php$";s:18:"index.php?feed=rss";s:14:".*wp-rss2.php$";s:19:"index.php?feed=rss2";s:14:".*wp-feed.php$";s:19:"index.php?feed=feed";s:22:".*wp-commentsrss2.php$";s:34:"index.php?feed=rss2&withcomments=1";s:32:"feed/(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:27:"(feed|rdf|rss|rss2|atom)/?$";s:27:"index.php?&feed=$matches[1]";s:20:"page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:41:"comments/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:36:"comments/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?&feed=$matches[1]&withcomments=1";s:29:"comments/page/?([0-9]{1,})/?$";s:28:"index.php?&paged=$matches[1]";s:44:"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:39:"search/(.+)/(feed|rdf|rss|rss2|atom)/?$";s:40:"index.php?s=$matches[1]&feed=$matches[2]";s:32:"search/(.+)/page/?([0-9]{1,})/?$";s:41:"index.php?s=$matches[1]&paged=$matches[2]";s:14:"search/(.+)/?$";s:23:"index.php?s=$matches[1]";s:47:"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:42:"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:52:"index.php?category_name=$matches[1]&feed=$matches[2]";s:35:"category/(.+?)/page/?([0-9]{1,})/?$";s:53:"index.php?category_name=$matches[1]&paged=$matches[2]";s:17:"category/(.+?)/?$";s:35:"index.php?category_name=$matches[1]";s:42:"tag/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:37:"tag/(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:42:"index.php?tag=$matches[1]&feed=$matches[2]";s:30:"tag/(.+?)/page/?([0-9]{1,})/?$";s:43:"index.php?tag=$matches[1]&paged=$matches[2]";s:12:"tag/(.+?)/?$";s:25:"index.php?tag=$matches[1]";s:47:"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:42:"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:50:"index.php?author_name=$matches[1]&feed=$matches[2]";s:35:"author/([^/]+)/page/?([0-9]{1,})/?$";s:51:"index.php?author_name=$matches[1]&paged=$matches[2]";s:17:"author/([^/]+)/?$";s:33:"index.php?author_name=$matches[1]";s:69:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:64:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:80:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]";s:39:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$";s:63:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]";s:56:"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:51:"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$";s:64:"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]";s:44:"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$";s:65:"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]";s:26:"([0-9]{4})/([0-9]{1,2})/?$";s:47:"index.php?year=$matches[1]&monthnum=$matches[2]";s:43:"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:38:"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$";s:43:"index.php?year=$matches[1]&feed=$matches[2]";s:31:"([0-9]{4})/page/?([0-9]{1,})/?$";s:44:"index.php?year=$matches[1]&paged=$matches[2]";s:13:"([0-9]{4})/?$";s:26:"index.php?year=$matches[1]";s:58:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:68:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:88:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:83:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$";s:85:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1";s:77:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]";s:72:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]";s:65:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$";s:98:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]";s:57:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$";s:97:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]";s:47:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:57:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:77:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:72:"[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:25:".+?/attachment/([^/]+)/?$";s:32:"index.php?attachment=$matches[1]";s:35:".+?/attachment/([^/]+)/trackback/?$";s:37:"index.php?attachment=$matches[1]&tb=1";s:55:".+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:50:".+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$";s:49:"index.php?attachment=$matches[1]&feed=$matches[2]";s:18:"(.+?)/trackback/?$";s:35:"index.php?pagename=$matches[1]&tb=1";s:38:"(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:33:"(.+?)/(feed|rdf|rss|rss2|atom)/?$";s:47:"index.php?pagename=$matches[1]&feed=$matches[2]";s:26:"(.+?)/page/?([0-9]{1,})/?$";s:48:"index.php?pagename=$matches[1]&paged=$matches[2]";s:18:"(.+?)(/[0-9]+)?/?$";s:47:"index.php?pagename=$matches[1]&page=$matches[2]";}
thank you smrtalex. I edited the info in the phpmyadmin value.
haha, after some testing i realized that posts still do not work, (sorry for linking my site, will remove if needed):https://www.signaturestop.com/signaturetutorials/hello-world/
this was the first post in the signaturetutorials category, and gives a 404. however, if i want to view all posts in a certain category:
https://www.signaturestop.com/category/signaturetutorials/
does work!! this link used to be https://www.signaturestop.com/?cat=4 and now automatically redirects to the rewritten link
so it worked to a certain extend, i still cannot view posts though. getting there! thanks for the help (going to bed now will check back tomorrow)
edit: it might not work because you used a different structure? I remember reading you used a Date structure whereas i am only using categoryname/postname (might be wrong on this its 4 am ?? )
edit: it might not work because you used a different structure? I remember reading you used a Date structure whereas i am only using categoryname/postname (might be wrong on this its 4 am ?? )
and indeed this was the case! after using your structure ( /%year%/%monthnum%/%day%/%postname%/ ) my posts now seem to work. i guess everyone with trouble should install a 2.6.5 version and get the values from phpmyadmin haha
post:
https://www.signaturestop.com/2008/12/28/text-tutorial-testI had the same problem with https://2009.nl (a fresh wp 2.7 install on apache2/php5) and it works now after just changing the first part of rewrite_rules in wp_options table…
Changed s:12 into s:11 (as that string seems to be 11 chars long) — I didn’t check all of them ??a:63:{s:11:"robots.txt$";.......
Same thing with another wp 2.7 blog on apache2/php4.4.4..
But what can be the cause of this? Some host setting somewhere?Was solved by these apache vhost settings:
magic_quotes_runtime = Off magic_quotes_sybase = Off
sweet, where do i set those? you dont have to change the
a:63:{s:11:"robots.txt$";.......
part when you do this?Changing from s:12 to s:11 solved the issue for me as well…posts, categories, archives and feeds are now functional with pretty permalinks. Unfortunately, on a shared host I don’t have any access to apaches settings, so does anyone know if changing to s:11 is a permanent fix?
Interesting that miscounting by one could cause a bug like that…I checked some of the other strings and they seem to be correct…didn’t have time to check them all, however.
rutgerhensel.. Thanks!
I though I had tried that previously, but apparently I didn’t. Instead of modifying the virtual host file, I added the following lines to my .htaccess in my WordPress root installation directory:php_flag magic_quotes_runtime Off
php_flag magic_quotes_sybase OffAnd it worked!!!
Hope this helps others!!!
smrtalex
gm10gm10,
Would it be possible to post your Linux kernel, PHP, and MySQL versions, as well as the php settings, from your new hosting account?Sorry for late reply.
Appache 2.2.10
MySQL 5.0.51a
PHP 5.2.6 Not sure where to look for settings.Good luck
gm
I was having the same problem until a couple minutes ago. I just installed WP2.7 on an Ubuntu 8.10 server running Apache2.2.9, PHP5.2.6-2ubuntu4 w/Suhosin-Patch, mod_python3.3.1, Python2.5.2, and mysql5.0. Nothing I tried that was listed in this topic worked, so I did a site-wide search for Rewrite Rules (as I noticed that the Rewrite Rules in the database for 2.6.5 had “robots.txt” and 2.7 had “robots/.txt” and thought this may have something to do with it). Anyway, I found a post from about 6 months ago where a guy had the exact same issue on an Ubuntu server install. Turns out that it was an Apache2 error. The VirtualHost file had “AllowOverride None” for my webroot folder of /var/www/. I added a new directory listing in the VirtualHost file for the blog directory (/var/www/blog/) and added “AllowOverride All”. After doing this the Permlinks work beautifully now!
I had also wiped out 2.7 and dropped down to 2.6.5 previously to try and correct, but it still gave the 404 error and was extremely slow.
fixing it to a:63:{s:11:”robots.txt$”;…….
does work for a while, up until you add a new page. then you have to dive into the mysql and change it again. sucks ??
will using
php_flag magic_quotes_runtime Off
php_flag magic_quotes_sybase Offfix it for me? i used it before, but it gave me a 505 i believe. but i hadnt changed the mysql table yet when i tried that
Yeah, I just noticed this as well. It’s okay if you don’t add too many new pages all the time, because posts don’t change anything.
I also got the 505 trying to add the php_flag stuff to my .htaccess. I’m about to e-mail my host and just link them this thread.
you don’t happen to be using Anhosting do you? heh.
adding the php_flag stuff gives me an internal server error, so for now im just jumping into phpmyadmin every 10 minutes to change the string while im setting up all the pages and content. a minor change to a page or order in which the pages have to be displayed will set the string back to s:12.
Yup, I am…that’s how I found the thread. Have you submitted a ticket about it yet? If not, I mean, this is two verifiable instances of the same problem…maybe we can get some results?
Er, I want to clarify: a ticket based on this latest information about allowoverride and php_flags, as you’ve already sent one in about the 404 error in general.
- The topic ‘Day and name Permalinks results in 404 error’ is closed to new replies.