|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
I've got what I think is a simple mod_write question. If a request
comes in as /news/12345 I'd like it translated internally as /news.php?id=12345 Here's what I've got: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule /news/(.*) /news.php?id=$1 [R,NE] But it is not working. The error log shows: File does not exist: /path/to/my/documentroot/news Any ideas? Thanks in advance. Sean |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
Try to change this to:
RewriteEngine on RewriteRule ^/news/([0-9]+)$ /news.php?id=$1 On Oct 13, 2:34 am, "Sean" <seanmichaelbr...@gmail.com> wrote: > I've got what I think is a simple mod_write question. If a request > comes in as /news/12345 I'd like it translated internally as > /news.php?id=12345 > > Here's what I've got: > > RewriteEngine on > RewriteBase / > RewriteCond %{REQUEST_FILENAME} !-d > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule /news/(.*) /news.php?id=$1 [R,NE] > > But it is not working. The error log shows: > > File does not exist: /path/to/my/documentroot/news > > Any ideas? > > Thanks in advance. > > Sean |
|
![]() |
| Outils de la discussion | |
|
|