i can't open url with ":" inside url in my localhost for example, i can't open http://bolehnonton.dev/Halo-4:-Forward-Unto-Dawn (this is in my localhost). the result page in my browser is
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403 bolehnonton.dev
Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.6.12
but i can open similiar url with my hosting, http://bolehnonton.com/Halo-4:-Forward-Unto-Dawn
although htaccess file of both is similiar.
here my vhost configure on my xampp
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/xampp/htdocs/bolehnonton.com"
ServerName bolehnonton.dev
<Directory C:/xampp/htdocs/bolehnonton.com>
Allow from all
Require all granted
Options Indexes
</Directory>
</VirtualHost>
Colon IS an invalid character in URL unless it is used for its purpose (for eg http://). "...Only alphanumerics [0-9a-zA-Z], the special characters "$-_. +! *'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL."
It's just a separator. It doesn't 'mean' or 'specify' anything. In your own example it is also used to separate the scheme from the hostname.
It is an Apache bug on Windows declared as WONTFIX in 2009. I fixed it in libapr-1.dll
, function test_safe_name
in srclib\apr\file_io\win32\filestat.c
to return ERROR_FILE_NOT_FOUND
for names with colon.
if (*name == '?' || *name == '*')
return APR_EPATHWILD;
else
return (*name == ':') ? APR_FROM_OS_ERROR(ERROR_FILE_NOT_FOUND) : APR_EBADPATH; // was: APR_EBADPATH;
I could avoid recompiling Apache and patched the binary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With