This is a discussion on add slash to virtual dir within the Apache Web Server forums, part of the Web Server and Related Forums category; how can i add slash to virtual directory? i put this rule in htaccess RewriteRule ([^/]+)/$ /index.php?id=$1 [T=...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
how can i add slash to virtual directory?
i put this rule in htaccess RewriteRule ([^/]+)/$ /index.php?id=$1 [T=application/x-httpd-php,last] and www.example.com/dir/ redirect to www.example.com/index.php?id=1 but www.example.com/dir return a 404 -- Josh www.pixael.com icq: 59204079 |
|
|||
|
"Josh" <josh@pixael.com> ha scritto nel messaggio
news:c6r77f$ep2o8$1@ID-203386.news.uni-berlin.de... > how can i add slash to virtual directory? > i put this rule in htaccess > RewriteRule ([^/]+)/$ /index.php?id=$1 [T=application/x-httpd-php,last] > and www.example.com/dir/ redirect to www.example.com/index.php?id=1 > but www.example.com/dir return a 404 ok RewriteRule ^([^.])$ /$1/ [R] is this syntactically correct? -- Josh www.pixael.com icq: 59204079 |
|
|||
|
Josh wrote:
> how can i add slash to virtual directory? > i put this rule in htaccess > RewriteRule ([^/]+)/$ /index.php?id=$1 [T=application/x-httpd-php,last] > and www.example.com/dir/ redirect to www.example.com/index.php?id=1 > but www.example.com/dir return a 404 > Try this: RewriteRule ([^/]+)/?$ /index.php?id=$1 [T=application/x-httpd-php,last] --------------------^ Note the "?" after the slash. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended. |
| Thread Tools | |
| Display Modes | |
|
|