htacces重写规则,一些网址不起作用

时间:2017-04-01 01:30:53

标签: apache .htaccess

我的重写规则存在一些问题,希望你们中的一些人可以帮助我。

为什么:

https://dagenshug.dk/produkter/hende/ <- This url is working
https://dagenshug.dk/produkter/begge/ <- this url is working
https://dagenshug.dk/produkter/asjdkkljasd/ <- yes even this url is working

https://dagenshug.dk/produkter/ham/&lt; - 这个不行? :S

我无法找到问题,我一直在搜索和搜索..

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


Options +Indexes +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#SSL REDIRECT
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

#404 REDIRECT
ErrorDocument 404 https://dagenshug.dk/404/
RewriteCond %{REQUEST_URI} ^/404/$
RewriteRule ^(.*)$ index.php?page=404.php [L]


#SEO FRIENDLY CODES
RewriteRule ^home index.php [NC,L]
RewriteRule ^kontakt index.php?page=contact.php [NC,L]
RewriteRule ^gevinst index.php?page=campaign.php [NC,L]
RewriteRule ^tak-for-handlen index.php?page=checkout-finish.php [NC,L]
RewriteRule ^endnu-engang-tillykke index.php?page=campaign-finish.php [NC,L]
RewriteRule ^gevinst index.php?page=campaign.php [NC,L]
RewriteRule ^Dagenshug index.php?page=dagenshug.php [NC,L]
RewriteRule ^Kundeservice/([0-9a-zA-Z]+) index.php?page=customerservice.php#$1 [NC,L]
RewriteRule ^Kundeservice index.php?page=customerservice.php [NC,L]
RewriteRule ^Om-dagenshug index.php?page=about.php [NC,L]
RewriteRule ^kurv/([0-9a-åA-Å_-]+)/([0-9a-åA-Å_-]+) index.php?page=cart-controller.php&product_number=$1&size=$2 [NC,L]
RewriteRule ^kurv/([0-9a-åA-Å_-]+) index.php?page=cart-controller.php&product_number=$1 [NC,L]
RewriteRule ^kurv index.php?page=cart.php [NC,L]
RewriteRule ^produkter/([0-9a-åA-Å_-]+) index.php?page=category.php [NC,L]
RewriteRule ^produkt/([0-9a-åA-Å_-]+) index.php?page=product.php&product_url_link=$1 [NC,L]
RewriteRule ^kassen opc-checkout.php [NC,L]
RewriteRule ^mail/ mail-order-confirm.php [NC,L]
RewriteRule ^nyheder index.php?page=blog.php [NC,L]

这就是我在.htaccess文件中的全部内容。

任何人都可以帮助我吗?

0 个答案:

没有答案