我遇到了麻煩,我有我的SEO友好的URL完全按照我想要的方式工作。每次我試圖迫使HTTPS它打破了我所有的RewriteRule
的強制HTTPS中斷htaccess中的RewriteRule
#error redirect
ErrorDocument 404/
Options +FollowSymLinks
RewriteEngine on
#add trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*[^/]$ /$0/ [L,R=301]
#rewrite pages
# Main Site
RewriteRule ^photo/([^/]*)/([^/]*)$ /photo.php?slug=$1 [L]
RewriteRule ^video/([^/]*)/([^/]*)$ /video.php?slug=$1 [L]
RewriteRule ^quote/([^/]*)/([^/]*)$ /quote.php?slug=$1 [L]
RewriteRule ^post/([^/]*)/([^/]*)$ /post.php?slug=$1 [L]
RewriteRule ^author/([^/]*)/([^/]*)$ /author.php?display_name=$1 [L]
RewriteRule ^tag/([^/]*)/([^/]*)$ /tag.php?tag_name=$1 [L]
RewriteRule ^category/([^/]*)/([^/]*)/$ /category.php?slug=$1&page=$2 [L]
RewriteRule ^category/([^/]*)/([^/]*)$ /category.php?slug=$1 [L]
RewriteRule ^blog/$ /blog.php [L]
RewriteRule ^blog/([^/]*)/([^/]*)$ /blog.php?page=$1 [L]
RewriteRule ^edisto/$ /edisto.php [L]
RewriteRule ^edisto/([^/]*)/([^/]*)$ /edisto.php?page=$1 [L]
RewriteRule ^mischief/$ /mischief.php [L]
RewriteRule ^mischief/([^/]*)/([^/]*)$ /mischief.php?page=$1 [L]
RewriteRule ^dynamite-lady/$ /dynamite-lady.php [L]
RewriteRule ^dynamite-lady/([^/]*)/([^/]*)$ /dynamite-lady.php?page=$1 [L]
RewriteRule ^videos/$ /videos.php [L]
RewriteRule ^videos/([^/]*)/([^/]*)$ /videos.php?page=$1 [L]
RewriteRule ^photos/$ /photos.php [L]
RewriteRule ^photos/([^/]*)/([^/]*)$ /photos.php?page=$1 [L]
RewriteRule ^meet-the-crew/$ /meet-the-crew.php [L]
RewriteRule ^check-ins/$ /check-ins.php [L]
RewriteRule ^404/$ /404.php [L]
RewriteRule ^(\d+)/?$ /index.php?page=$1 [L,QSA]
我沒有注意到你_forcing_ https的任何地方。 – hjpotter92