Jump to content

PHP and mod_rewrite


jfgreco915

Recommended Posts

.htaccess code for rewrite
[code]
RewriteEngine On
RewriteRule ^news/(.*) /view_news.php?t=vn&nid=$1
[/code]


Page being redirected to.
[code=php:0]

<? include('header.php'); ?>
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" class="news-head">News Archives -></td>
</tr>
<tr>
<td align="left" class="padding">
<br>
<?
switch ($_GET['t'])
{
case('vn'):
$bfd->view_news();
break;
default:
$bfd->list_all_news();
break;
}
?>
</td>
</tr>
</table>
<br>
<? include('footer.php'); ?>

[/code]
Link to comment
https://forums.phpfreaks.com/topic/25055-php-and-mod_rewrite/#findComment-114207
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.