mod rewrite - Zend MVC - htaccess redirect -
Text after "
All, my Zend Framework application structure is like this:
billingsystem - application -design --css --struct.css --icons --styles --images --js --common --thirdparty -public --index.php -. Htaccess -library - Zend
My ApacheVehost is like this:
& lt; VirtualHost *: 80 & gt; ServerAdmin webmaster@billingsystem.localhost DocumentRoot / opt / lampp / htdocs / XAMPP / billingsystem server name billingsystem errorlog log / billingsystem.localhost-error.log CustomLog log / billingsystem.localhost-access.logMemory & lt; Directory / opt / lampp / htdocs / XAMPP / billingsystem & gt; Follow Optional OptionsSend timeCancel all orders, Allow all to deny 127.0.0.1 from & lt; / Directory & gt; & Lt; / VirtualHost & gt;
My .htaccess in the public folder is like this:
# leading% {DOCUMENT_ROOT} is required on RewriteEngine when the VirtualHost reference is used in RewriteCond% {DOCUMENT_ROOT}% {REQUEST_FILENAME} -s [OR] rewrite code% {DOCUMENT_ROOT}% {REQUEST_FILENAME} -l [OR] Rewaid condom% {DOCUMENT_ROOT}% {REQUEST_FILENAME} -D Rivetrium ^. * $ - [NC, L] Remit Rules ^. * $ Index.php [NC, L]
If I browse, it shows the Apache directory path on the browser. If I go, the application implements the code on the web page. Is it possible to create a directory structure or modify the .htaccess file such that, browse to a user, should it be redirected to the browser and is possible instead of the code executed?
In addition, how can I redirect the user "public" directory when he tries to access any folder through the browser?
After
I just went through the medium to do something on a site that was my solution Two .htaccess files were needed to be used in the root level of a site and the second in the public
folder.
So, at the root of the domain one looks like this:
& lt; Files .htaccess & gt; Allow orders, from all & lt; / Files & gt; Option + rewrite on follow-up linksIngenin #Redwriting rules on the Jade Rewrite rule ^ (. *) $ / Public / $ 1 [nc, L] Adhendler PHP 5-script .php
I have the following rules in the public
folder:
& lt; Files .htaccess & gt; Allow orders, from all & lt; / Files & gt; RewriteEngine at RewriteCond% {REQUEST_FILENAME} -s [OR] RewriteCond% {REQUEST_FILENAME} -l [OR] Rewaid condom% {REQUEST_FILENAME} -D Rivetrium ^. * $ - [NC, L] REVIRATES RULES ^ (. *) $ Index.php [NC, L]
It is good to get all the material smuggling through this thread framework Works the way.
Hope this is useful - Liam
Comments
Post a Comment