I have a .htaccess file on root.On root folder there are three files.
index.php
article.php
event.php
on index.php there two href to event and news.php files.
to article.php:
$articleId=123;
$articleTitle='First Article';
echo '<a href="'.$articleId.'&'.str_replace(" ","-",$articleTitle).'">Read More</a>';
and to event.php:
$eventId=789;
$eventTitle='First Event';
echo '<a href="'.$eventId.'&'.str_replace(" ","-",$eventTitle).'">Read More</a>';
Above two href’s are on the index.php.
To handle the redirect i have written following code on htaccess file.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) article.php?arid=$1&$2
RewriteRule (.*) event.php?eveid=$1&$2
These are the types on urls that we need to see on browser.
article:localhost/system/articleid-articletitle and then for event : localhost/system/eventid-eventtitle
But when i add the second rewrite line,system is not loading and when i remove one rewrite condition system works fine. can anyone help me out?.
Thanks in advance and hope i have clearly mention the question.