1

I'm using Zend Framework (not full version, just some components), but I'm having a little problem. I didn't develop the software that I'll give support. When I tried to install, the first page is redirecting until it breaks my server: http://localhost/software/manager/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index/index...

Well I looked at all the code and can't figure out what's wrong. Here's my code:

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ bootstrapClass.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L]

php_flag magic_quotes_gpc off
php_flag register_globals off
php_value session.auto_start 0
Options -Indexes

http://pastebin.com/DTHrWJYn

1 Answer 1

2

The problem is in the line

RewriteRule ^(.*)$ public/$1 [L]

Url Rewriting works this way. After the url got rewritten, the rules are applied again.

To avoid this, use a RewriteCond, for example whether the file does not exist:

RewriteCond %{REQUEST_FILENAME} !-f
Sign up to request clarification or add additional context in comments.

1 Comment

sorry for the late response, but I wasn't around by any technology devices for some days (yeah I didn't know how too). well... actually it didn't work or didn't understand (I guess I didn't understood). I tried: RewriteCond %{REQUEST_URI} !^/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ public/$1 [L] and RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ public/$1 [L] but I'm still having the same results. thank once again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.