Forum Moderators: phranque
site.com) and I noticed that his homepage is being redirected as http://www.site.com/index.php. I want to 301 redirect this to just http://www.site.com, however, I read that there's a possibility of creating an infinite loop if I just go ahead and do a 301 redirect (site.com/index.php redirecting to site.com, which calls site.com/index.php, which redirects, etc...) DirectoryIndex sitehome.php <? header("Location: http://www.example.com"); ?> AddDefaultCharset UTF-8
# BEGIN Mod_Rewrite
RewriteEngine On
RewriteCond %{http_host} ^site.com
RewriteRule ^(.*) http://www.site.com/$1 [R=301,L]
# END Mod_RewriteRewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/www\.site\.com\/index\.php" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^info/index.html$ "http\:\/\/www\.site\.com\/index\.php" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^referral/?$ "http\:\/\/www\.site\.com\/index\.php" [R=301,L] RewriteCond %{http_host} ^site.com
RewriteRule ^(.*) http://www.site.com/$1 [R=301,L] http://www.1on1mandarin.com/index.php) Warning: Cannot modify header information - headers already sent by (output started at /home/jon1m0/public_html/index.php:1) in /home/jon1m0/public_html/index.php on line 1