httpd.conf adding the rewrite (mod_rewite) rules to your server

3 views
Skip to first unread message

Scott Haines

unread,
Jun 2, 2010, 1:08:19 AM6/2/10
to Hacker Dojo PHP
<Directory "/var/www/html">
Options +FollowSymLinks
Options +Indexes
RewriteEngine ON
RewriteRule ^hackerblog/(.*)/(.*)$ blog_entry.php?action=$1&id=2
RewriteRule ^hackerblog/(.*)$ blog_entry.php?action=$1
</Directory>

You need to add the above block to your httpd.conf file on your server
to get rewriting to work.

Here is the catch, you need to have mod_rewrite installed in apache
for this to work and the rewrite engine needs to be turned on.

typical httpd.conf is located in either: /usr/local/apache or /etc/
httpd

Good Luck.

andy

unread,
Jun 2, 2010, 5:54:45 PM6/2/10
to Hacker Dojo PHP
Thanks for that!
Reply all
Reply to author
Forward
0 new messages