regex - htaccess rule to parse php@parameter=anything as php file -


i want server treat files.php@parameter=anything simple php file

i don't need use symbol "@" separator, such "?"

but still want parse files.php@parameter=anything single php file without using parameters after @

i need like:

addhandler php-script .php@cnt=(.*) 

but doesn't work..

p.s. got clother code

<filesmatch \.php@cnt=(.*)$>  sethandler php-script  </filesmatch> 

but doesn't work too..

i suggest using mod_rewrite rewrite.

enable mod_rewrite , .htaccess through httpd.conf , put code in .htaccess under document_root directory:

options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on  rewriterule ^[^@]+@(.+)$ /$1?$2 [l] 

this internally rewrite /files.php@parameter=anything /files.php?parameter=anything , url handled php script.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -