Dwayne Andy Buckley wrote:
Joshua Slive wrote:On 6/29/06, Dwayne Tharpe <dtharpe@xxxxxxx> wrote:Hi all, I'm new to this and have never used mod-rewrite before or used regular expressions. We have a need to mod_rewrite a link. Below is what I'm using in a .htaccess file: RewriteEngine on Options FollowSymLinksRewriteRule ^overview$ /guide/index.cfm?item=Chapter&Chapter_ID=C342 [L]The problem is that "overview" is the name of a subdirectory under guide, so I get an error (403 I think) when it tries to rewrite. I can't rename the subdirectory and the users are demanding that they be able to use just the word "overview" as a hyperlink. Any suggestions? And I'm under a major time constraint :(What does the error log say? What does the RewriteLog say? The easist way to do this would be to put the RewriteRule in the main server config rather than in .htaccess. Then you can simply useRewriteRule ^/guide/overview$ /guide/index.cfm?item=Chapter&Chapter_ID=C342 [L]Otherwise, as you're using a .htaccess file, you probably need to add a "RewriteBase /guide" statement. Otherwise you get into a sort of chicken/egg scenario about the order of resolving URLs to bits of the filesystem: see the bit at the top of the mod-rewrite docs for more info. Andy ---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
-- Dwayne Tharpe Applications Analyst Programmer II Highway Safety Research Center @ UNC 919.843.4963 --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx