| remove/hide param from url, friendly url
|
danielpopa

msg:4546717 | 10:17 am on Feb 19, 2013 (gmt 0) | I want to access domain.com/api/(.*) instead of domain.com/public/api/(.*) Directory structure:
domain.com __folder1 __folder2 __public ____api ______.htaccess2 ____afolder1 ____afolder2 ____index.html __folder3 __file1 __file2 __.htaccess1 .htaccess1 RewriteEngine on SetEnv APPLICATION_ENV production RewriteRule ^$ /public/ [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/public/ RewriteCond %{REQUEST_URI} !^/api/ RewriteRule ^(.*)$ /public/$1 [L] .htaccess2 RewriteEngine on SetEnv APPLICATION_ENV production RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L] I tried different combinations and I came to this simplest one. I tried Alias, put the API folder on root directory, etc. To mention that the index.html from public folder is loaded first at domain.com, public folder is document root.
|
lucy24

msg:4546753 | 1:20 pm on Feb 19, 2013 (gmt 0) | Uhmm... And what was the question?
|
danielpopa

msg:4548620 | 1:12 pm on Feb 25, 2013 (gmt 0) | First line: I want to access domain.com/api/(.*) instead of domain.com/public/api/(.*) .. I need htaccess code to achieve this.
|
danielpopa

msg:4548621 | 1:14 pm on Feb 25, 2013 (gmt 0) | Basically, mapping a folder outside of DocumentRoot, as it is in root folder.
|
|
|