php - Mod Rewrite and java script popup -


hello facing issues mod_rewrite applied javascript pop-up. code rewrite part :

rewriteengine on rewriterule ^([^/]*)\.html$ /popup.php?id=$1 [l] 

but not working. sure mod_rewrite working on server because it's working joomla, , can see mod_rewrite loaded in <?php phpinfo(); ?>

this code open javascript popup

<script>  var newwindow; function box(url) { newwindow=window.open(url,'name','height=640,width=750'); if (window.focus) {newwindow.focus()} } </script> 

... ... ...

<td><a href="javascript:box('/popup.php?id=<?php echo $id; ?>');">click details</a> </font></td> 

thanks in advance help.

lateredit:

this content of .htaccess

options +followsymlinks rewriteengine on  rewriterule ^([^/]*)\.html$ /popup.php?id=$1 [l]  rewritecond %{query_string} mosconfig_[a-za-z_]{1,21}(=|\%3d) [or] rewritecond %{query_string} base64_encode.*\(.*\) [or] rewritecond %{query_string} (\<|%3c).*script.*(\>|%3e) [nc,or] rewritecond %{query_string} globals(=|\[|\%[0-9a-z]{0,2}) [or] rewritecond %{query_string} _request(=|\[|\%[0-9a-z]{0,2}) rewriterule ^(.*)$ index.php [f,l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !^/index.php rewritecond %{request_uri} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [nc] rewriterule (.*) index.php rewriterule .* - [e=http_authorization:%{http:authorization},l] 

what want acomplish : http://www.example.com/popup/1.html or http://www.example.com/1.html

with or without html doesn't matter, wanna rid of popup.php?id=1 part

i'm not sure see how htaccess matches issue.

as far can see try catch urls sur http://mysite/popup/foo/bar rewritten popup.php?foo=bar

if need add [l] tag line

rewriterule ^popup/(.*)/(.*)/$ /popup.php?$1=$2 [l] 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -