gpt4 book ai didi

.htaccess - OpenCart 2.2 : https configuration not loading css

转载 作者:太空宇宙 更新时间:2023-11-03 14:31:25 25 4
gpt4 key购买 nike

我尝试在 iptamenafanaria 中启用 ssl .

当我在这个页面时:https://www.iptamenafanaria.gr/all-products然后单击产品链接,例如:Confetti Cannons 它重定向到此页面:https://www.iptamenafanaria.gr/all-products/kanonakia-komfeti它不加载 cssjs 文件。但是如果我访问 https://www.iptamenafanaria.gr/kanonakia-komfeti然后 cssjs 正确加载。所以我想这与重定向有关,可能在 .htacess 中?

这是.htaccess文件

RewriteEngine on

RewriteCond %{HTTP_HOST} iptamenafanaria\.gr [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://iptamenafanaria.gr/$1 [R=301,L]

# URL CANONICALIZATION with www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L]


<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>

#GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>

#BROWSER CACHE
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/x-javascript "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>


# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On




# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

#RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

redirect 301 /Home.html http://www.iptamenafanaria.gr/index.php?route=common/home
redirect 301 /Lost-password.html http://www.iptamenafanaria.gr/index.php?route=account/forgotten
redirect 301 /Log-in.html http://www.iptamenafanaria.gr/index.php?route=account/login
redirect 301 /Ιπτάμενα-Φανάρια-Καρδιά.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-kardia?
redirect 301 /Λευκά-Ιπτάμενα-Φανάρια.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria/leuka-iptamena-fanaria?
redirect 301 /Ιπτάμενα-Φανάρια/Πολύχρωμα-Ιπτάμενα-Φανάρια-5-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria/xromatista-iptamena-fanaria?
redirect 301 /Καινοτόμα-Ιπτάμενα-Φανάρια/Ιπτάμενα-φανάρια-σε-σχήμα-διαμαντιού/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-diamanti?
redirect 301 /Καινοτόμα-Ιπτάμενα-Φανάρια/Ιπτάμενα-φανάρια-σε-σχήμα-κυλινδρικό/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-kylindrika?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων/Ιπτάμενα-Φανάρια-Βάπτισης-50-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-vaptisis?
redirect 301 /Ιπτάμενα-Φανάρια-Γάμου.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-gamou?
redirect 301 /Ιπτάμενα-Φανάρια-Γενεθλίων.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-genethlion?
redirect 301 /Ιπτάμενα-Φανάρια-Πάρτυ.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-party?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Αστέρια-και-Φεγγάρια-Χάρτινα-Φωτοφόρα-Φανάρια-10-τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/asteria-feggaria?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Happy-Birthday-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/happy-birthday?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Just-Married-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/just-married?
redirect 301 /Διακοσμητικά-Φανάρια-Ήλιος.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/ilios?
redirect 301 /Χάρτινα-Φανάρια-Σακούλα/Διακοσμητικά-Φανάρια-Καρδιά-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/kardia?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Καρδιά-με-περιστέρια-10-Τεμάχια/flypage.tpl.html http:/www./iptamenafanaria.gr/all-products/hartina-fanaria/kardia-me-peristeria?
redirect 301 /Φανάρια-Νερού-Νούφαρο.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou/fanaria-nerou-noufaro?
redirect 301 /Φανάρια-Νερού/Φανάρια-Νερού-Κύβος-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou/fanaria-nerou-tetragona?
redirect 301 /Κανονάκια-Κομφετί/Κομφετί-Κανονάκι-Κόκκινες-Μεταλλικές-Καρδιές/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kanonakia-komfeti/kokkines-metallikes-kardies?
redirect 301 /Κομφετί-Κανονάκι-Λευκά-Ροδοπέταλα.html http://www.iptamenafanaria.gr/all-products/kanonakia-komfeti/leuka-rodopetala?
redirect 301 /Ιπτάμενα-μπαλόνια-με-ήλιον/Λευκά-Οικολογικά-Περιστέρια-Βιοδιασπώμενα-Μπαλόνια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/biodiaspomena-mpalonia/leuka-oikologika-peristeria?
redirect 301 /Χάρτινες-Μπάλες/Χάρτινα-Πομ-Πομ/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kremasta-diakosmitika/xartina-pompom?
redirect 301 /View-all-products-in-shop.html http://www.iptamenafanaria.gr/all-products?
redirect 301 /oroi-kai-proipotheseis.html /terms?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon?
redirect 301 /ΧΑΡΤΙΝΕΣ-ΜΠΑΛΕΣ/View-all-products.html http://www.iptamenafanaria.gr/all-products/kremasta-diakosmitika?
redirect 301 /Επικοινωνία/IptamenaFanaria.GR.html http://www.iptamenafanaria.gr/contact?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων/Ιπτάμενα-Φανάρια-Γάμου-50-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-gamou?
redirect 301 /component/option,com_forme/Itemid,208/ http://www.iptamenafanaria.gr/sales?
redirect 301 /Φανάρια-Νερού.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou?
redirect 301 /Ιπτάμενα-Φανάρια/View-all-products.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria?
redirect 301 /tropoi-pliromis.html http://www.iptamenafanaria.gr/payment?
redirect 301 /Ιπτάμενα-Φαναρια-Κατάστημα.html http://www.iptamenafanaria.gr/all-products?

最佳答案

您可以使用此代码重定向到 https 和 www

RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

并删除除默认 opencart htaccess 代码之外的额外代码

希望对你有帮助

关于.htaccess - OpenCart 2.2 : https configuration not loading css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52608044/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com