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 7432851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:31:25+00:00 2026-05-29T09:31:25+00:00

I have a link http://mysite.com/myname which shows the profile page.. But if i use

  • 0

I have a link http://mysite.com/myname which shows the profile page.. But if i use multiple

slashes like http://mysite.com///myname , it also shows the page..

My htaccess code is :

RewriteCond %{REQUEST_URI} ^/(\w+)/?$ [NC]

RewriteRule ^ profile.php?username=%1 [L,QSA]

How to avoid this problem?

Can someone help me?

  • 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-05-29T09:31:25+00:00Added an answer on May 29, 2026 at 9:31 am

    Not sure why do you really want to block multiple slashes but here is a way to do that:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/{2,} [NC]
    RewriteRule ^ - [L,F]
    

    This will give Forbidden error is a URI has multiple slashes at start like ///myname will generate:

    Forbidden

    You don’t have permission to access /myname on this server.

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

Sidebar

Related Questions

I have a link http://mysite.com/username which redirects to profile page of current username.. My
I have a link linking to http://mysite.com/profile.php?username=myname and when we click it the browser
I have a page with code... <script language=JavaScript> var link = <img src='http://www.mysite.com/file.php?var1=firstName&var2=lastName&var3=phone'>; document.write(link);
Let's say I have a links like this: http://mysite.com?i=343435&f=224&u=334 and this link is constant
I have this link: http://mysite.com/subdirectory/something/stuff/index.php What regex would I be able to use that
If I have a link of a picture like that: http://www.google.com/images/srpr/logo3w.png Can I retrieve
Lets say I have a String: Go to this page: http://mysite.com/?page=1 , and I
I have more link in Google es: http://www.mysite.com/blog/23-08-2012/example.html http://www.mysite.com/blog/more/ http://www.mysite.com/blog/test/example.html how to rewrite the
i have a link in my app with the following URL: http://www.mysite.com/test?group=MyGroup the issue
I have a site like: http://*mysite.com/search/ in it index.php is generating History.pushState() for history.js

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.