*sighs* Permalinks
-
OK, i could not get permalinks working in WP 2.0. So, i searched www.ads-software.com and found someone that upgraded to WP 2.01 and then immediately activated permalinks and he got it working (without the /index.php being shown in the browser). So, i upgraded to WP 2.01 and tried permalinks, no workie (/index.php is always shown=works). I use apache2 with php4 and mysql4. I have read conflicting posts where WP 2.0 does not use mod_rewrite? I run tghis linux box myself and have full access to it. I also have a .htaccess file (that is writeable) and adding the *begin wordpress jargon to it does not work. I would like my link format like this: https://www.domain.here/contact and /faq and so on. The index.php always shows and if i change it to what i want, i get a 404 error. Can anyone help?
-
First off, I’m sure you have
mod_rewrite
on. But, you need to scroll down in thehttpd.conf
and change the AllowOverride option toAll
. This should work, if not, tell me.Same thing happens (index.php shows). I am selecting Numeric
? https://www.mytimewithgod.net/index.php/archives/123 in “permalinks”. This also populates “custom” (which is under “numeric”) with the same entry. I also have tried Date and name based
? https://www.mytimewithgod.net/index.php/2006/02/17/sample-post/, same thing happens (index.php shows). Thanks for any help, Direkt
*EDIT/ Oh, i have also tried “custom” /index.php/archives/%post_id% (both with the /index.php and without /index.php)/*EDITDirekt is probably on the right track. I’d like to suggest you have another go at it: Search through the httpd.conf for AllowOveride and set to ALL – for the proper directory that hosts your blog! If you search the conf, you’ll find AllowOveride in several spots.
Then restart the httpd service.
And, for permalinks, do not include “index.php” if doing custom as that would defeat your goal.
I only find 1 instance of AllowOverride ALL in my httpd file. And it is set to ALL. This file is found in my /etc/apache2 folder. That is what i am trying to do, not include /index.php.
Few questions:
you’ve restarted httpd?
Do you have link to your site?
What is currently in your .htaccess?
Yes, restarted a few times.
https://www.mytimewithgod.net
When i first started to get permalinks working, nothing was in there but this:
PHP_FLAG output_buffering On (this is in there so i could use an ajax theme from bloxpress)
Then, after searching here for permalinks problems, i found others that were saying their htaccess file had this in it:
#BEGIN WorPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME !-f
RewriteCond %{REQUEST_FILENAME !-d
RewriteRule . /index.php
</IfModule>
#END WordPress
Just for clarification, i entered this into the htaccess file myself. Because i read conflicting posts, here, that WP 2.0 and up did not use mod_rewrite. I also searched my software for “apache” and “mod_rewrite”, not found. I am not sure that mod_rewrite is installed (unless it installs by default with apache2). Thanks again… and I’m not bright enough to know if you “need” mod_rewrite for wp2.x, but I’d start by heading back to the httpd.conf and seeing if it is loaded. Look for a line like:
LoadModule rewrite_module modules/mod_rewrite.so
As long as there’s not a # in front, it should be loaded. Suppose you could make a little .php page with only phpinfo() in it and check that way too.
Apache on *nix or windows?
(this is hard! On my stuff I just jump on the box and start poking around. Trying to do this methodically means I have to think more… hopefully someone bright will show up soon…
For what it’s worth, I fought this battle a couple months ago, but got it fixed with AllowOverride)
Nope, it does not look like it is loaded (if needed). Both a search through httpd produced no refeence of mod_rewrite and my phpinfo file also does not produce any reference of mod_rewrite. I am thinking, it DOES need to be loaded to use permalinks. Sorry, it is apache2 on Linux SLES9 (novell distro). Are you running Linux? If so, do you mind telling me how you got mod_rewrite installed. This distro uses a package manager called red carpet, and i can not find any reference of mod_rewrite using red carpet or yast. Where in your httpd file does your mod_rewrite appear? Thanks again for the help, you have answered many questions!
*/EDIT…Yep, it IS installed (by default) and is found in /usr/lib/mod_rewrite.so. But the weird thing is, no reference of it is found in the httpd file. I wonder if i make an entry in the httpd file, will this work?…EDIT*/I’m running fedora core 4. Installed and loaded by default. I’d go ahead and add it to your LoadModule section and restart and see what happens.
Well, i got a little further ?? Seems novell has done some modifications to this distro. There isn’t a section in httpd of LoadModule; this section says include /etc.sysconfig.d/LoadModule and this file has the LoadModules inside it. Also this file refers to /etc/sysconfig/apache2 where you also insert the mod_rewrite.so file along with its file path. So now, all entries in the WP admin panel are now missing the /index.php/blah/blah. It simply has /blah/blah, no index.php. And it still does not work and to get it back to working state, i must select the default permalink format. Like i said, got some where but not working with custom permalinks
OK, here are the weird apache2 files:
httpd file:
# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.confloadmodule.conf file:
# as listed in APACHE_MODULES (/etc/sysconfig/apache2)LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so
LoadModule suexec_module /usr/lib/apache2-prefork/mod_suexec.so
LoadModule access_module /usr/lib/apache2-prefork/mod_access.so
LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so
LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so
LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.so
LoadModule auth_dbm_module /usr/lib/apache2-prefork/mod_auth_dbm.so
LoadModule autoindex_module /usr/lib/apache2-prefork/mod_autoindex.so
LoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so
LoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so
LoadModule env_module /usr/lib/apache2-prefork/mod_env.so
LoadModule expires_module /usr/lib/apache2-prefork/mod_expires.so
LoadModule include_module /usr/lib/apache2-prefork/mod_include.so
LoadModule log_config_module /usr/lib/apache2-prefork/mod_log_config.so
LoadModule mime_module /usr/lib/apache2-prefork/mod_mime.so
LoadModule negotiation_module /usr/lib/apache2-prefork/mod_negotiation.so
LoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so
LoadModule userdir_module /usr/lib/apache2-prefork/mod_userdir.so
LoadModule ssl_module /usr/lib/apache2-prefork/mod_ssl.so
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
LoadModule jk_module /usr/lib/apache2/mod_jk.so
#
Apache2 file:
# APACHE_MODULES=”access actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir”
# your settings
APACHE_MODULES=” rewrite suexec access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif userdir ssl php4 jk”Can anyone help?
OK, got mod_rewrite verified as loaded and restarted apache2. Still can not get permalinks working. Now, looking at the htaccess file, it was exactly like this:
#BEGIN WorPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME !-f
RewriteCond %{REQUEST_FILENAME !-d
RewriteRule . /index.php
</IfModule>
#END WordPress
Now, when updating permalink structure, it looks like this:
#BEGIN WorPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME !-f
RewriteCond %{REQUEST_FILENAME !-d
RewriteRule . /index.php
</IfModule>#END WordPress
Notice the white space at the end. So, i know this file is getting written to because of the change. Problem is, i also read here on the forums, that the white space is not good and will cause it not to work. Any ideas?Boy…. I’m stumped, personally.
That space before
"#END WordPress"
is in my .htaccess as well and doesn’t seem to harm anything.I went to have a look at your site, but right now you must have it set to “Default” for permalinks.
Good to know that someone else has the white space and it works. I do have it set for default now but can set it to the other if you would like to test drive it?
Edit..Set to numeric for testing. Let me know…Editok, I test drove. Still broke.
https://www.mytimewithgod.net/2006/02/17/bible-verses-we-are-comforted/ doesn’t work, yet
https://www.mytimewithgod.net/index.php/2006/02/17/bible-verses-we-are-comforted/
works just fine (as you knew).Anything of use here: https://codex.www.ads-software.com/Using_Permalinks#Fixing_Other_Issues ?
- The topic ‘*sighs* Permalinks’ is closed to new replies.