1
我想转发麻烦与的.htaccess
https://pinpoll.net/plugin/getPoll?category_id=27
到
https://pinpoll.com/plugin/getPoll?category_id=27
此外,任何非安全http:// 。 。 *应该被转发到https://*pinpoll.com例如,
http://pinpoll.net/Blog
到https://pinpoll.com/Blog
或
http://pinpoll.com
到https://pinpoll.com
规则应该不影响任何的子域像https://dev.pinpoll.com但工作http://www.pinpoll.net被转发给https://pinpoll.net。
这是我的.htaccess看起来像此刻:
RewriteEngine on
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php [QSA]
RewriteCond %{HTTP_HOST} ^(.*)pinpoll\.de [NC]
RewriteRule ^(.*)$ https://pinpoll.com/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^(.*)pinpoll\.at [NC]
RewriteRule ^(.*)$ https://pinpoll.com/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^(.*)pinpoll\.us [NC]
RewriteRule ^(.*)$ https://pinpoll.com/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^(.*)pinpoll\.co.uk [NC]
RewriteRule ^(.*)$ https://pinpoll.com/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^(.*)pinpoll\.net [NC]
RewriteRule ^(.*)$ https://pinpoll.com/$1 [R=permanent,L]
RewriteCond %{HTTPS} !on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 days"
<FilesMatch "\.(gif|jpe?g|png)$">
ExpiresDefault "access plus 20 days"
Header set Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(js)$">
ExpiresDefault "access plus 5 days"
Header set Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(php)$">
Header set Cache-Control "private"
</FilesMatch>
</ifModule>
<IFModule mod_deflate.c>
<filesmatch "\.(js|css|html|jpg|jpeg|png|gif)$">
SetOutputFilter DEFLATE
</filesmatch>
</IFModule>
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|cache)$">
Order Allow,Deny
Deny from all
</FilesMatch>
例URL
http://pinpoll.net/plugin/getPoll?category_id=27
将成为
https://pinpoll.com/index.php/getPoll?category_id=27
...这是我想要什么差不多,但我正在失去/插件/正在被替换为/index.php/。后者应该只有如果既不文件(!-f),也不文件夹(!-d)存在,这是不为所希望的输出是
https://pinpoll.com/plugin/getPoll?category_id=27
任何帮助的情况下/提示的高度赞赏的情况下!
干杯,托比亚斯
让我们[继续聊天讨论](http://chat.stackoverflow.com/rooms/64243/discussion-between-anubhava-and -tobias)。 – anubhava 2014-11-04 13:57:46
非常感谢,anubhava! – Tobias 2014-11-04 14:12:54