Can an htaccess could detect a browser if it's javascript enable or disabled and write a certain condition if javascript is disbled?
Like this
if(js)
DirectoryIndex ../locnfo/jsenable.php else
DirectoryIndex ../locnfo/jsdisable.php
Can an htaccess could detect a browser if it's javascript enable or disabled and write a certain condition if javascript is disbled?
Like this
if(js)
DirectoryIndex ../locnfo/jsenable.php else
DirectoryIndex ../locnfo/jsdisable.php
No, an .htaccess
file cannot do such a thing : an .htaccess
file configures how Apache (server) behaves -- while Javascript is something that's on the client-side (browser).
If you want to detect whether Javascript is enabled or not, you'll have to do that on the client-side.
About that, here are a couple of questions / answers that might help :
This has to be done on the client side, it cannot be detected elsewhere. The best thing I would suggest is to have something like
<script type="text/javascript">
document.write('<script type="text/javascript" src="path/to/js"></script>');
</script>
so the file is only included if Javascript is enabled.