View Full Version : just need "#" can work in my url request

02-26-2009, 12:19 PM
why does "%23"(means "#") in request URL can't be resolved correctly on bluehost??

I have a Django project running under fastcgi on Bluehost. Pages like "http://domain.com/tags/c%23/" just doesn't work. It redirects to a new url like as "http://domain.com/t/tags/c/"??

How can I get it right?!!

02-26-2009, 02:24 PM
If it's redirecting you, it's not because of the server. Something in your script or setup is causing it.

02-26-2009, 02:35 PM
Thanks for your reply.

Actually no, same code can work on different working environment here, but without luck on BH. I'm quite sure it's not a coding issue.

Here is the .htaccess file and it doesn't seem to have problems:

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteBase /
#static file setting
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(static/.*)$ - [L]
RewriteCond %{REQUEST_URI} !(dispatch.fcgi)
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

02-26-2009, 03:30 PM
Nothing in your htaccess file should be causing the behavior you're seeing.

However, the URL can't just change from "/tags/c%23/" to "/t/tags/c/" without some redirect action going on (I could see it possibly dropping everything after the "c" as a url fragment). My server resolves /xx%23xx/ as /xx#xx/ without any problems, which means something in django is likely causing this.

If it isn't doing it on other servers, what's different?

03-07-2009, 04:50 AM
Same code works fine on our development environment.
The difference is we directly use Django internal web server on our computer, and server is using apache and fastcgi.

If it's a programming issue, we should see the same result locally. I guess it may be apache or fastcgi configuration problem, but I am not sure if I can overwrite settings in .htaccess or through other ways.