In pure Browser javascript i think this is impossible. The browser dont have
access to this information. When you access the url it goes to apache and
gets the correct file based on your mod_rewrite rules. The response doesnt
include the file it has acessed. It could be dangerous.

Beside this fact, you could grab this information with your server-side
language and drop it into your js code or as an attribute of some node.
Dunno how its done with PHP but it can be done.

--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces
Twitter: fabiomiranda
http://solucione.info


On Wed, Jun 16, 2010 at 5:46 PM, Dailce <[email protected]> wrote:

> I have apache rewrite on which I need because it's making my URL seo
> friendly.
> So I have say index.php and my site is set up so that the URL will
> show index.html
>
> I have tried this code:
>
>  var cfile = new URI().get('file');
>  var togglers = $$('li a.tog2');
>  var curtC = Cookie.read('activestate');
>  if(curtC == null || curtC < 0 || curtC == '' || (cfile !=
> 'index.php')){
>        curtC = Cookie.write('activestate', -1);
>  }
>
> Which is working but it's returning index.html as the file name.
>
> However, the real filename is index.php
> How can I get the REAL filename?
>
> Thank you.
>
>

Reply via email to