Organizational Research By

Surprising Reserch Topic

Question:.htaccess mod rewrite for two pages


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ /me/profile.php?username=$1 [QSA,L]

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ /me/index.php?page=$1 [QSA,L]
The second rewrite for index page isn't working, but however, the first for the profile page works.

This is what I used in my index.php:

    if(isset($_GET['page']) === true && empty($_GET['page']) === false){

        if($_GET['page'] == 'Home'){
?>

Works!

}else{

Error page!

}
}
?>
So what is the problem with the index page. How can I rewrite for both of them?
asked Sep 13, 2013 in htaccess by anonymous
edited Sep 12, 2013
0 votes
28 views



Related Hot Questions



Government Jobs Opening


...