Posts Tagged mod_rewrite
Enabling Mod_Rewrite in Apache 2.x
Posted by clifgriffin in Technology on October 28th, 2008
Trying to enable mod_rewrite in Apache 2? Check these things.
- In your
httpd.conffile (probably in/etc/httpd/conf/), search for the line:
LoadModule rewrite_module modules/mod_rewrite.so
Ensure there is no pound sign (#) in front of this line. - Search for
AllowOverrideand ensure it is set toAll. - Search for
AccessFileName. If you do not find a line that says:
AccessFileName .htaccess
You need to add it. - Restart Apache (
service httpd restartOR/etc/init.d/httpd restart)
That should be it.
WordPress, IIS, permalinks, and 404′s oh my!
Posted by clifgriffin in Technology on October 13th, 2008
Installing WordPress on IIS is easy, but getting it working perfectly is more difficult.
Without extra work, you cannot achieve nice looking perma links like:
http://clifgriffin.com/2008/10/02/some-post-title
Instead, you have to use something like:
http://clifgriffin.com/index.php?p=95
or slightly better,
http://clifgriffin.com/index.php/2008/10/02/some-post-title
Unfortunately, search engines don’t like either of the above.
In an effort to fix this, I began searching for the easiest way to fix this. There are several ways you can do it.
- Install ISAPI_Rewrite Professional (Lite version doesn’t work)
- Use a custom 404 page. (works well, but kind of a hack)
- Use WordPress URL Rewrite.
Both 1 and 3 emulate mod_rewrites functionality. 3 is custom written to support only wordpress.
I tried the custom 404 page. It worked for the most part but some plugins seemed to have troubles with it (it manually sets the POST information and then includes the index page…very much a hack). I asked my host to install ISAPI_Rewrite, but they weren’t ready to shell out $99 on my behalf. So, I finally asked them to install WordPress URL Rewrite. In a couple of hours they obliged me and everything is working fine.
The only problem I’m having now is that my custom 404 page (built into the wordpress theme) isn’t working currently. I’ve posted on the binaryfortress forums and hope to resolve this soon.
In such time I will update this post. In the meantime, these are the 3 most reliable methods of doing this. I hope this gives you a jump start.
Recent Comments