You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sean Brown <sb...@gmail.com> on 2006/11/06 21:39:04 UTC

[users@httpd] mod rewrite question

I had already posted this on the configuration list, but got no
replies, so I thought someone here might be able to better answer.

I've got an odd thing happening and I'm not sure why.  I've got the
following mod rewrite conditions and rules for the default site on my
apache box:

<Directory />
   Options FollowSymLinks
   AllowOverride All
   Order deny,allow
   Deny from all

   RewriteEngine on
   RewriteCond %{REQUEST_URI}  /press/
   RewriteRule /press/(.*) /press.php?id=$1 [L]

   RewriteCond %{REQUEST_URI}  /jobs/
   RewriteRule /jobs/(.*) /jobs.php?id=$1 [L]
</Directory>

This works fine.  Does what I want it to, which is rewrite
/jobs.php?id=873465 to /jobs/873465.   All's well there.  However, a
side affect is that an alias that I have in my main configuration no
longer works:

Alias /mysql /path/to/phpMyAdmin-2.8.0.3

When I browse to http://localhost/mysql , I get a "Forbidden.  You
don't have permission to access /mysql/ on this server."  When I
comment out the mod rewrite lines and bounce apache, it goes back to
working just fine.

Any insight?

Thanks,

Sean

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod rewrite question

Posted by "Bumbia, Kamran" <Ka...@coair.com>.
Have you checked the Rewrite Logs. They should indicate how the rewrite
actually took place. You might be able to tell why in the case of
phpadmin the rewrite is being called and why it is giving you those
errors.


Kamran

-----Original Message-----
From: Sean Brown [mailto:sbrown48@gmail.com] 
Sent: Monday, November 06, 2006 2:39 PM
To: users@httpd.apache.org
Subject: [users@httpd] mod rewrite question

I had already posted this on the configuration list, but got no
replies, so I thought someone here might be able to better answer.

I've got an odd thing happening and I'm not sure why.  I've got the
following mod rewrite conditions and rules for the default site on my
apache box:

<Directory />
   Options FollowSymLinks
   AllowOverride All
   Order deny,allow
   Deny from all

   RewriteEngine on
   RewriteCond %{REQUEST_URI}  /press/
   RewriteRule /press/(.*) /press.php?id=$1 [L]

   RewriteCond %{REQUEST_URI}  /jobs/
   RewriteRule /jobs/(.*) /jobs.php?id=$1 [L]
</Directory>

This works fine.  Does what I want it to, which is rewrite
/jobs.php?id=873465 to /jobs/873465.   All's well there.  However, a
side affect is that an alias that I have in my main configuration no
longer works:

Alias /mysql /path/to/phpMyAdmin-2.8.0.3

When I browse to http://localhost/mysql , I get a "Forbidden.  You
don't have permission to access /mysql/ on this server."  When I
comment out the mod rewrite lines and bounce apache, it goes back to
working just fine.

Any insight?

Thanks,

Sean

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org