0
你好,我想刪除任何尾隨從我的乾淨的網址,斜線,到目前爲止我的htaccess具有下面的代碼:網址的mod_rewrite刪除consequtive結尾的斜槓上乾淨的URL
#php_flag display_startup_errors on
#php_flag display_errors on
#php_flag html_errors on
RewriteEngine on
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|jpg|png|gif)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)(.*)$ /index.php?page=$1&request=$2
#GAMW TON OHANAH
RedirectMatch 301 ^/component/(.*)$ http://www . evented . gr
ErrorDocument 404 /error.php?e=404
ErrorDocument 400 /error.php?e=400
ErrorDocument 401 /error.php?e=401
ErrorDocument 403 /error.php?e=403
ErrorDocument 405 /error.php?e=405
ErrorDocument 408 /error.php?e=408
ErrorDocument 410 /error.php?e=410
ErrorDocument 411 /error.php?e=411
ErrorDocument 412 /error.php?e=412
ErrorDocument 413 /error.php?e=413
ErrorDocument 414 /error.php?e=414
ErrorDocument 415 /error.php?e=415
ErrorDocument 500 /error.php?e=500
ErrorDocument 501 /error.php?e=501
ErrorDocument 502 /error.php?e=502
ErrorDocument 503 /error.php?e=503
ErrorDocument 506 /error.php?e=506
,如果你喜歡,你可能會發現奇怪的行爲通過訪問www。平了。 gr
PS。我想要一個沒有任何內容的代碼,用0斜槓 代替,例如www.domain.com ////// to www.domain.com 或www.domain.com/events//////到www.domain.com/events
我已經tryed以下,但沒有運氣
RewriteCond %{REQUEST_URI} ^(.*?)(?:/){2,}$
RewriteRule . $1/ [R=301,L]
和
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]