Re: [users@httpd] .htaccess error URGENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 FollowSymLinks
RewriteRule ^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 use
RewriteRule ^/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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux