|
Author |
Message |
php4ever
Junior WebHelper
Joined: 10 Oct 2002
Posts: 49
|
Posted:
Thu Aug 21, 2003 10:46 pm (20 years, 10 months ago) |
|
I have a .htaccess file that has the following:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^making_tables/item([0-9])$ making_tables.php?tablenum=$1
This only partially works in that the url is correctly rewritten but then it's as if the php script loses its connection to the PHP engine as the script is dead in the water. Yet when I run the php script with its normal url everything works.
Any ideas why this might be happening?
Thanks,
php4ever |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sat Aug 23, 2003 12:07 am (20 years, 10 months ago) |
|
I'm not sure I quite understand you....what exactly happens with the php script? |
________________________________ It's turtles all the way down... |
|
|
|
php4ever
Junior WebHelper
Joined: 10 Oct 2002
Posts: 49
|
Posted:
Mon Aug 25, 2003 10:47 pm (20 years, 9 months ago) |
|
OKay, here's the php script making_tables.php
<?php
$LIMIT = $_GET['tablenum'];
if ($LIMIT > 10) {
$LIMIT = 1;
}else if ($LIMIT < 0) {
$LIMIT = 1;
}
function MakeTable($bgclr,$i,$txclr) {
?>
<TABLE border=0 style="border:3px solid lightgrey;background:<?php echo $bgclr ?>;color:<?php echo $txclr ?>" width="70%">
<TR align="left"><TH><B><?php echo $i ?>.</b>
</tr>
<TR>
<TD align="right" width="25%">Image</td><TD><input NAME="IM[<?php echo $i ?>]" type="text" SIZE="40" MAXLENGTH="100">
</td>
</tr>
<TR>
<TD align="right">Width</td><TD><INPUT NAME="WI[<?php echo $i ?>]" SIZE="40" MAXLENGTH="100">
</td>
</tr>
<TR>
<TD align="right">Height</td><TD><INPUT NAME="HI[<?php echo $i ?>]" SIZE="40" MAXLENGTH="100">
</td>
</tr>
</table>
<p></p>
<?php }// end MakeTable()
for ($num=1; $num<=$LIMIT; $num++) {
$clr = ($num % 2)? 'lightsteelblue' : 'silver';
$tx = ($num % 2)? 'maroon' : 'black';
MakeTable( $clr, $num, $tx );
}
?>
and I've slightly modified my .htaccess and it is as follows:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^making_tables/([0-9]+)$ making_tables.php?tablenum=$1
However, this still doesn't work right. The url with the query string is rewritten but the php seems to just die. Any help you can offer I'd greatly appreciate!
--php4ever |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.131543 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |