Bruce Kingsbury wrote:
José Ferradeira wrote:Hi,I allways go to an infinite loop with IE and to this message "exceeded redirection limit" with Firefox when configuring mod_rewrite to redirect users trying to direct access any page on my site to the homepage.I'm on a test environment, with this configuration, using Fedora Core 2 with Apache 2.0.49-4 :httpd.conf : .... <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride AuthConfig Options FileInfo Order allow,deny Allow from all </Directory> .... /var/www/html/.htaccess : RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://192.168.5.230 [NC] RewriteRule /* http://192.168.5.230 [R,L] What am I doing wrong? Any suggestion ?http://192.168.5.230 will redirect to http://192.168.5.230/ .. your rule will bounce it back to http://192.168.5.230 again. Try adding a trailing slash in both the rewrite condition and rule?--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
I tried with the trailing slash also tried this RewriteCond %{HTTP_REFERER} !^http://192.168.5.230/$ [NC] But the result is the same, I allways go in to an infinite loop. Any more suggestions? -- ------------------------------------------------------------------------ *CensorNet* <http://ti.theta.pt/censornet/index.php> Controlo e gestão dos acessos à Internet *WEBPORT* <http://ti.theta.pt/webport/index.php> A sua informação sempre On-Line --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx