Error 403 in mod_rewrite

New to mod_rewrite? This is a good place to start.

Error 403 in mod_rewrite

Postby TchuX! » Mon Oct 20, 2003 12:31 am

Hi!

I am having a bit of a problem with mod_rewrite. This module is active on my apache server. My codes:
index.php
Code: Select all
<?
function replace_for_mod_rewrite(&$s) {
$urlin = array("'(?<!/)news.php\?id=([0-9]*)'","'(?<!/)affiliates.php'","'(?<!/)addnews.php'",);

$urlout = array("news\\1.html","affiliates.html","addnews.html",);

$s = preg_replace($urlin, $urlout, $s);
return $s;
}
?>

.htaccess
Code: Select all
RewriteEngine on
RewriteRule /index.html /index.php

#News
RewriteRule ^news([1-9][0-9]*).html news.php?id=$1

#Affiliates
RewriteRule ^affiliates.html affiliates.php

#AddNews
RewriteRule ^addnews.html addnews.php


But always i get a 403 error.

what am I doing wrong?

Thanks All

Ciao
TchuX!
 

Postby TchuX! » Mon Oct 20, 2003 8:08 am

Help Please !!!

Thanks
TchuX!
 

Postby TchuX! » Wed Oct 22, 2003 5:58 am

I have change a .htaccess file, with this:

Code: Select all
Options SymLinksifOwnerMatch
RewriteEngine on
Rewritebase /
RewriteRule /index.html /index.php

#News
RewriteRule ^news([1-9][0-9]*).html news.php?id=$1

#Affiliates
RewriteRule ^affiliates.html affiliates.php

#AddNews
RewriteRule ^addnews.html addnews.php


Now, i dont obtain the 403 error, but the script no rewrite the urls

Please, help !!!

Thanks
TchuX!
 


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 26 guests

cron