[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 512
  • Last Modified:

How to create rewrite rules on Fedora 5 Apache

Hi,

in wordpress

all customized permalinks will not work unless rewriting rules is enables as stated in

http://www.sitepoint.com/article/guide-url-rewriting/1

my local office url is http://192.168.xxx.xxx/wordpress

anypost will be reflected as http://192.168.xxx.xxx/wordpress/?post_id

this is what i did:
in /etc/httpd/conf/httpd.conf
FROM #LoadModule rewrite_module modules/mod_rewrite.so

TO

LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

second line is added m manually
--------------------------------------------------------
I add the following to /etc/httpd/conf/httpd.conf


#</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteRule ^/shortcut$ /complicated/and/way/too/long/url/here
#RewriteRule /products/([0-9]+) /siteengine/products.php?id=$1
RewriteRule /([0-9]+) /wordpress/?=p$1
</IfModule>

when I try to restart httpd

[root@localhost conf]# /etc/rc.d/init.d/httpd start
Starting httpd:
 Apache 1.3 configuration directives found
 please read /usr/share/doc/httpd-2.2.0/migration.html
                                                           [FAILED]

I would appreciate if anyone could provide me what's wrong and a feasible solution

Still puzzled

thanks a lot!
0
shortandsharp
Asked:
shortandsharp
  • 2
1 Solution
 
giltjrCommented:
AddModule was removed with Apache V2.0.  Get rid of it.
0
 
shortandsharpAuthor Commented:
Are you implying apache 2.0 no longer supports rewrite?

so, how do I fixed my problem? thanks
0
 
giltjrCommented:
No I am stating the fact that AddModule is no longer supported.

Rewrite is still supported and my guess will always be supported.  The Apache API changed in a way that AddModule is no longer needed and 2.0 dropped support for it.

http://httpd.apache.org/docs/2.0/upgrading.html

search on "AddModule"
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now