Forum Moderators: phranque
Addesses:
mydomain.com/Red
mydomain.com/Green
...
.htacces:
<Files Red>
ForceType application/x-httpd-php
</Files>
...
Now is it possible to reduce the structure to just one file, that can read Red, Green, ... as parameters?
Thanks
--
globay
RewriteEngine On
RewriteRule ^(.*)$ /index.php?color=$1 [L]
That should do it.
If you want to have one dynamic processing page in your root folder that will handle the parameters, use the method from msg#2. you will have to change the url in the rewrite to your script.
RewriteEngine On
RewriteRule ^(.*)$ /dynamic_script.php?color=$1 [L]
Now you can call the variable $color to determine what to show on the page.
mydomain.com/Any/complicated/Url.goes?here
should open the following file: mydomain.com/database.php
-- .htaccess --
RewriteEngine On
RewriteRule ^(.*)$ /database.php [L]
---------------
Thanks
--
globay!