Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:48:02+00:00 2026-06-16T10:48:02+00:00

Hello I would like to remove any trailing slashes from my clean urls so

  • 0

Hello I would like to remove any trailing slashes from my clean urls so far my htaccess has the following code:

#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

You may observe the strange behaviour if you like by visiting www . evented . gr

PS. I want consequtive slashes that have nothing in between to be replaced with 0 slash
for example http://www.domain.com////// to http://www.domain.com
or http://www.domain.com/events////// to http://www.domain.com/events

I have tryed the following but with no luck

RewriteCond %{REQUEST_URI} ^(.*?)(?:/){2,}$
RewriteRule . $1/ [R=301,L]

and

RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:48:03+00:00Added an answer on June 16, 2026 at 10:48 am

    You can’t do this with mod_rewrite. By the time your rules get applied, apache has already normalized the URI, all duplicate slashes are removed. If you make a request for:

    http://www.evented.gr//////a////////b/////c/////d///////
    

    The URI that mod_rewrite sees is this:

    /a/b/c/d/
    

    You’ll have to come up with a different solution. The best thing to do is to fix this at the source, don’t deploy with URLs that have duplicate slashes in the first place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following code I would like to hide Hello world but keep visible
hello i would like to know if there is any dll or global hook
Hello! I would like to extract all citations from a text. Additionally, the name
I'm trying to remove excess whitespace from a string like this: hello        world
Hello I would like to display an other splashscreen after the default one, if
Hello I would like to use preg_match in PHP to parse the Desired text
Hello I would like to use the sass module in a play application. We
Hello I would like to know if my script is good; I want to
Hello I have a datatable that I would like to filter with a single
Hello I have 2 lists that contains the same objects. I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.