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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:18:30+00:00 2026-06-09T11:18:30+00:00

I got a weird problem with CodeIgniter’s URI segment system. When I have this

  • 0

I got a weird problem with CodeIgniter’s URI segment system.

When I have this URL:

http://www.mywebsite.com/forums/category_name/forum_name/topic_name.. (yes, the name has two dots)

Now I do this in PHP:

$topic = $this->uri->segment(4);
>>> echo $topic: 'topic_name..'

This works perfectly. But here comes the weirdness.. When I append a reply to the URL like this:

http://www.mywebsite.com/forums/category_name/forum_name/topic_name../reply

Now I do the PHP code again:

$topic = $this->uri->segment(4);
>>> echo $topic: 'topic_name '

As you can see it suddenly replaces my “..” with ” ” (one space, why not even two?).

Does anyone have any idea if the URI segment method might maybe sanitize something when I add a segment after one with dots (“.”). The odd thing is when I manually fix the URL with a space behind it, it works again because after the trim() it still has the “..”‘s left, where CodeIgniter didn’t seem to touch them this time:

http://www.mywebsite.com/forums/category_name/forum_name/topic_name..%20/reply

$topic = $this->uri->segment(4);
> echo $topic: 'topic_name.. '
>>> echo trim($topic): 'topic_name..'
  • 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-09T11:18:31+00:00Added an answer on June 9, 2026 at 11:18 am

    See below url:-

    URI Class in CodeIgniter

    The URI Class provides functions that help you retrieve information from your URI strings. If you use URI routing, you can also retrieve information about the re-routed segments.

    http://codeigniter.com/user_guide/libraries/uri.html

    Read this

    I believe what is happening is that your server is using ./index.php as a 403.
    Adding “…” to the URI will result in one of two things happening.

    1) The browser will try to change the folder handle and go up one or two directories

    2) In the case of Apache Web Server “(20024)The given path is misformatted or contained invalid characters”

    I would not recommend placing dots in the URI unless it is for the url suffix and then only one dot is required.

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

Sidebar

Related Questions

I have been puzzled by this weird problem and it got me stuck. Please
I got this weird problem where System.Action cant be resolved when its not explicitly
im a newbie to flash,and i hav got this really weird problem.i have created
I've got a weird problem where if i do something like this in a
I am facing a weird problem. I have got a file called in which
ive got a really weird problem. i have no clue why its not working.
I got a VERY weird problem happening with ALL my DocumentCompleteEventHandlers. Say I have
I got a really weird problem here and I absolutely cannot understand why this
I got this very weird problem...and it's very important to my...dead line is close...and
I'm trying to build a Debian package, but I've got this weird pseudo-directory problem.

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.