Re: [users@httpd] Redirect users trying to access any page on my site to the homepage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux