Htaccess rewrite PHP $_GET multiple pages?

For your htaccess you can do this: RewriteEngine ON RewriteCond %{REQUEST_FILENAME}! -f RewriteCond %{REQUEST_FILENAME}! -d RewriteRule ^(.*)$ index.

Php? Mode=$1 L,QSA However, don't change your PHP code to just include whatever you are getting from $_GET'mode'! This will allow users to include at will You could adjust your PHP code like so: $pages = array("register" => "includes/register.

Php", "login" => "includes/login. Php"); if(isset($_GET'mode') && $pages$_GET'mode') include $pages$_GET'mode' PS: The two RewriteCond s make sure the url is not an existing file or folder (i.e. If you have a folder images then site.Com/images will still go to that folder instead of index.

Php? Mode=images.

For your . Htaccess you can do this: RewriteEngine ON RewriteCond %{REQUEST_FILENAME}! -f RewriteCond %{REQUEST_FILENAME}!

-d RewriteRule ^(.*)$ index. Php? Mode=$1 L,QSA However, don't change your PHP code to just include whatever you are getting from $_GET'mode'!

This will allow users to include at will. You could adjust your PHP code like so: $pages = array("register" => "includes/register. Php", "login" => "includes/login.

Php"); if(isset($_GET'mode') && $pages$_GET'mode') include $pages$_GET'mode'; PS: The two RewriteCond's make sure the url is not an existing file or folder (i.e. If you have a folder images then site. Com/images will still go to that folder instead of index.

Php? Mode=images.

1 Sorry for the long delay in accepting this answer, I had to make sure it was up to scratch when I implemented it into my system, it works like a charm... so far! Thank you. – Mike Sep 1 at 13:55 No probs, glad to help :) – Kokos Sep 1 at 14:16.

RewriteEngine on RewriteRule ^index. Php? Mode=(^/\.

+)? $ index. Php?

Mode=$1 L.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send