php - htaccess "redirect loop" -


my site not loading properly. reason when put htaccess code mentioned below, site home page loads without style or image. , when delete .htaccess server site loads shows .html on url.

here error get:

err_too_many_redirects

i can't seem figure out. i'm not htaccess guy :(

would appreciate kind of help

here htaccess code:

addtype text/html .shtml .shtm .htm .html addhandler server-parsed .shtml .shtm .htm .html  options indexes followsymlinks includes -line commented- uncomment version of php have on server -line commented- 1 of following  can uncommented -line commented-addhandler application/x-httpd-php5 .shtml addhandler application/x-httpd-php52 .shtml -line commented-addhandler application/x-httpd-php54 .shtml -line commented-addhandler application/x-httpd-php56 .shtml -line commented-addhandler application/x-httpd-php4 .shtml rewriteoptions inherit rewriteengine on options +indexes -line commented- going ssl rewritecond %{server_port} 80  rewriterule ^(.*)$ https://mysite[dot]com/$1 [r=301,l] rewritecond %{request_uri} ^(.*)/(.*)$  rewriterule . %1/%2 [r=301,l]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)\.php$ /$1 [l,r=301]  -line commented- others rewritecond %{http_host} ^mysite\.com$ [or] rewritecond %{http_host} ^www\.mysite\.com$ rewriterule ^terms$ "http\:\/\/mysite\.com\/\/about\-terms" [r=301,l] rewritecond %{http_host} ^.*$ rewriterule ^contact\.html\/?(.*)$ "https\:\/\/mysite\.com\/contact_captcha\.html$1" [r=301,l] 

you testing permanent redirects. never this, causes weird unreproducable bugs, after changing rule wrong.

you have rule makes no sense whatsoever:

rewritecond %{request_uri} ^(.*)/(.*)$  rewriterule . %1/%2 [r=301,l] 

this infinite loop redirects on , on same page. unclear me want accomplish rule, delete it. delete cache in browser, close browser , reopen it. should clear cached redirect.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -