|
Note: This is not intend to be a Rewrite Rules tutorial! This is for those that look for a quick working solution! You can see the full detail of URL Rewriting Engine and the URL Rewrite Guide. I have a need to run my Mambo install from a folder call "mambo" but look like from the "webroot". Another word eventhough my Mambo is in "mambo" folder but you can access it via the normal http://ongetc.com, for example.
What are the steps that will make this work for me?
. The first thing is to install your Mambo in a folder call "mambo" . Next is to use Apache "Rewrite Rules" by using the ".htaccess" file in your "webroot"
** The content of my working .htaccess file *** RewriteEngine On RewriteOptions inherit
# if it's not a real file RewriteCond %{SCRIPT_FILENAME} !-f # rewrite to the subdirectory RewriteRule !^mambo(/?|/.+)$ /mambo%{REQUEST_URI} [L] ** The content of my working .htaccess file ***
Here are some quick explanation of the above file: . Turn on the Rewrite engine . Use Rewrite inheritant . If it is not file then process the rule below . The rule is any string start with "mambo" and anything follow it will be rewrited using the content of %{REQUEST_URI} variable excluding the word "mambo" . "L" mean this is the last rule
With above rule it will make your Mambo URL look like it is still in the "webroot" rather than the "mambo" folder.
Enjoy!
Add comments:
|
Comments
There are no comments yet. Feel free to add one using the form below. You are not authorized to leave comments. Please login first. |
|