I ran:
and it was successful but when I go into Gallery2 on my website, it says it's not using mod-rewrite. Then I activate Permalinks in Wordpress and it breaks all the pages outside the main page.Code:sudo a2enmod rewrite
I ran:
and it was successful but when I go into Gallery2 on my website, it says it's not using mod-rewrite. Then I activate Permalinks in Wordpress and it breaks all the pages outside the main page.Code:sudo a2enmod rewrite
Did you restart apache for the rewrite module to kick in?
Yes, restarted it. Then tried to reenable the module and it said it was already enabled. Then restarted Apache again. I cannot figure out why the regular Wordpress links work but as soon as I activate the Permalinks, all the pages break.
However on the website I have that's hosted remotely, which I pay for, Permalinks work perfectly fine. Must be a setting somewhere on my server, I figured it was with Rewrite.
What does the apache error log say about your broken permalinks?
Jim
If you create and upload a php file "phpinfo.php" with the following
When checking it with www.yoursite.com/phpinfo.php check the section "apache", there should see mod_rewrite under loaded modules.PHP Code:
<?php
phpinfo();
?>
Yup. Does this mean it's working?
Loaded Modules
core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_mime mod_negotiation mod_php5 mod_rewrite mod_setenvif mod_status
Where do I find this? Webmin? Under a certain folder?
EDIT - Found the location in webmin. Here's what the error.log says for the part where I was turning Permalinks on/off in Wordpress:
I don't yet have it set up on a domain, just bought one yesterday and have to set up the name servers first. Using the IP for now. So it works when using the page_id but once I turn on Permalinks, it changes the URL to .../wpg2 or .../about and I assume Apache2 is looking for those folders which don't exist. They're just URL rewrites but it's still pointing to the same page as before.[Thu Jan 29 20:44:51 2009] [error] [client 10.0.0.2] File does not exist: /home/deemar/public_html/examples/birth/about, referer: http://10.0.0.6/examples/birth/
[Thu Jan 29 21:13:31 2009] [error] [client 10.0.0.2] File does not exist: /home/deemar/public_html/examples/birth/about, referer: http://10.0.0.6/examples/birth/
[Thu Jan 29 21:25:26 2009] [error] [client 10.0.0.2] File does not exist: /home/deemar/public_html/examples/birth/wpg2, referer: http://10.0.0.6/examples/birth/
[Thu Jan 29 21:25:56 2009] [error] [client 10.0.0.2] File does not exist: /home/deemar/public_html/examples/birth/wpg2, referer: http://10.0.0.6/examples/birth/?page_id=3
Last edited by Maheriano; January 31st, 2009 at 01:33 AM.
Yeah it's on!
The other method to see if you have it available and when you do not have php installed is to run the following in a command line (it could be apache2ctl):
# sudo apachectl -t -D DUMP_MODULES
So now that you know the rewrite module is on, the next step is to configure your rewriting rules. This can be done through httpd.conf or in .htaccess. Most of the time, the web apps provide a htaccess file within the distribution but may have it disabled by renaming it. You should follow their instructions on enabling pretty urls.
Last edited by conjur3r; January 31st, 2009 at 01:55 AM.
You need to create a .htaccess file with some mod_rewrite rules in the root of your website, else rewrite function will not work good.
Put this in it and save it as .htaccess :
Code:# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Last edited by Zillion; January 31st, 2009 at 10:12 AM.
Bookmarks