Dears, i have this problem when i tried to access my site
The page isn't redirecting properly
I Think there are problem at .htaccess
This is my .htaccess Code, I got it when i active AllowOverride All at httpd
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/$1 [R,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
redirect 301 /PlaystationCards http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-PlaystationCards
redirect 301 /Mobile http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-Mobile
redirect 301 /Xbox http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-Xbox-USA
redirect 301 /Steam-Cards http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-SteamCards
redirect 301 /Nintendo http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-Nintendo-USA
redirect 301 /Games http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-Games
redirect 301 /beINSport http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-beIN
redirect 301 /paypal http://ec2-52-27-245-72.us-west-2.compute.amazonaws.com/All-Paypal-USA
<FilesMatch ".(zip|sql)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
# Header set Cache-Control "max-age=604800, public"
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
</IfModule>
#Turn eTags Off
#By removing the ETag header, you disable caches and browsers from being able to validate files, so they are forced to rely on your Cache-Control and Expires header. Source
<IfModule mod_headers.c>
# Header unset ETag
</IfModule>
FileETag None
#Compress Text Files
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
# and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
# as `AddOutputFilterByType` is still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>
</IfModule>
The problem seems to be in your first rewriteRule. You are redirecting the SERVER_PORT 80 (http) back to the same server port. Try changing the Rule's destination to
https://yoursite/$1 [L,R]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.