Comments on: Any Unix gurus care to help me with mod_rewrite? https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/?utm_source=rss&utm_medium=rss&utm_campaign=any-unix-gurus-care-to-help-me-with-mod_rewrite David L. Farquhar on technology old and new, computer security, and more Tue, 07 Sep 2004 22:02:00 +0000 hourly 1 By: Anonymous https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/#comment-3822 Tue, 07 Sep 2004 22:02:00 +0000 https://dfarq.homeip.net/?p=1295#comment-3822 In reply to Anonymous.

I recall having some trouble getting rewrite to work properly on my own servers to begin with. My working syntax translated to your example runs:

RewriteEngine on
RewriteBase "/"
RewriteRule ^article/([0-9]+)$ article.php?id=$1 [NC,L]

Note the base dirrective and that I found caret-slash didn’t ever match.

]]>
By: Anonymous https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/#comment-2985 Tue, 07 Sep 2004 03:26:42 +0000 https://dfarq.homeip.net/?p=1295#comment-2985 In reply to Anonymous.

Steve, a big thank you once again. I must have been thinking WordPress/b2 and not GL. I couldn’t tell you how long I’ve been staring at this, trying to figure it out.

]]>
By: Anonymous https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/#comment-2970 Tue, 07 Sep 2004 02:01:34 +0000 https://dfarq.homeip.net/?p=1295#comment-2970 Try changing the param name to article.php in the substitution to “story” instead of “id”:

RewriteRule ^/article/([0-9]+)$ /article.php?story?=$1 [NC,L]

That might be the only problem. Your regular expression appears to be OK.

]]>
By: Anonymous https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/#comment-2984 Tue, 07 Sep 2004 00:14:02 +0000 https://dfarq.homeip.net/?p=1295#comment-2984 I don’t know too much about it, but the documentation says it should be ‘pattern’ and then ‘substitution’. Looks like you have it backwards… I don’t know about the rest of it.


Dustin D. Cook, A+
dcook32p@htcomp.net

]]>
By: Anonymous https://dfarq.homeip.net/any-unix-gurus-care-to-help-me-with-mod_rewrite/#comment-2983 Mon, 06 Sep 2004 16:23:18 +0000 https://dfarq.homeip.net/?p=1295#comment-2983 Just to clarify, I do have the module installed and enabled:

LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so

I wish it were as simple as me overlooking that. 🙁

]]>