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

  • Home
  • SEARCH
  • 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 6122477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:54:12+00:00 2026-05-23T15:54:12+00:00

In our ZF based site, if a url contains $$$ or ~ on the

  • 0

In our ZF based site, if a url contains $$$ or ~ on the controller/action segment, it was not caught as 404 error, instead, they landed on the controller/action without the symbol, but when it tries to load the view script, the view script file is still having those symbol thus causing an error.

For example:

site.com/index$$$
script 'index$$$/index.phtml' not found in path

site.com/index-$$$
script 'index-$$$/index.phtml' not found in path

site.com/index~
script 'index~/index.phtml' not found in path 

site.com/index/index~
script 'index/index~.phtml' not found in path 

They must be caught as 404 error and out site can catch 404 errors if the controller/action is non existing.

ex: /badurl$$$, /non/existing~

Example: http://framework.zend.com/index.$$$/index~

Is there any existing issues / solutions to this?

Thanks in advance!

PS: we are still using ZF 1.0.3 but this also affects other sites which are in 1.8.2.

Update: This is the content of .htaccess

RewriteEngine on
RewriteBase /

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

# Redirect all https urls to http
# These are the pages excluded on the redirection
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^/minify/.*
RewriteCond %{REQUEST_URI} !^/myaccount/.*
RewriteCond %{REQUEST_URI} !^/akamai/.*
RewriteCond %{REQUEST_URI} !^/navigation/.*
RewriteCond %{REQUEST_URI} !^/cache/.*
RewriteCond %{REQUEST_URI} !^/includes/.*
RewriteCond %{REQUEST_URI} !^/images/.*
RewriteCond %{REQUEST_URI} !^/pdf/.*
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]

######################################################

# if non-PHP file is requested, display the file #
RewriteRule \.(js|ico|txt|gif|jpg|png|css|xml|swf|zip|pdf|gz)$ - [L,NC]

# if PHP file is requested and it exists, display the file #
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.php$ - [L]

# redirect everything else to controller #
RewriteCond %{REQUEST_URI} !^/server-status.*
RewriteRule .+$ index.php [L]

# Disable Etags
    FileETag none
  • 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-23T15:54:13+00:00Added an answer on May 23, 2026 at 3:54 pm

    The problem is not in your .htaccess file.

    Your problem is originating in the dispatcher see the protected method in 1.0.3 Zend_Controller_Dispatcher_Abstract::_formatName(). This method hasn’t changed since 1.0.3 either. So, an upgrade won’t help.

    It’s actually removing all the special characters from the URI using preg_replace('/[^a-z0-9 ]/', '', $segment) and returning a valid class name.

    Without writing your own custom dispatcher, you will have to use different naming with alphanumeric characters i.e. /xxx or /000

    See Method Below:

     /**
     * Formats a string from a URI into a PHP-friendly name.
     *
     * By default, replaces words separated by the word separator character(s)
     * with camelCaps. If $isAction is false, it also preserves replaces words
     * separated by the path separation character with an underscore, making
     * the following word Title cased. All non-alphanumeric characters are
     * removed.
     *
     * @param string $unformatted
     * @param boolean $isAction Defaults to false
     * @return string
     */
    protected function _formatName($unformatted, $isAction = false)
    {
        // preserve directories
        if (!$isAction) {
            $segments = explode($this->getPathDelimiter(), $unformatted);
        } else {
            $segments = (array) $unformatted;
        }
    
        foreach ($segments as $key => $segment) {
            $segment        = str_replace($this->getWordDelimiter(), ' ', strtolower($segment));
            $segment        = preg_replace('/[^a-z0-9 ]/', '', $segment);
            $segments[$key] = str_replace(' ', '', ucwords($segment));
        }
    
        return implode('_', $segments);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

got a weird question for you based on some weird happenings on our site.
Our jQuery Mobile based site will be used by large screen tablets and phones.
I am currently trying out Haystack for our django based forum site. I was
On our site, we provide to users a simulation based on their private information
I want to implement heatmap for our site based on our own site logs,
I am a newbie in Spring based web development. Our site is Spring based
I have been developing our php based site on a development box that was
Our web site makes use of showModalDialog . Based on what is done within
We have problem with our Qt based production server for our business application. When
We have a problem in our swing based application since we've upgraded our java

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.