php - .htaccess Rewrite an url with arguments in gif url -



php - .htaccess Rewrite an url with arguments in gif url -

after research still not able find solution work fine me.

now have url :

--> http://www.localhost.com/images/values-lock/countdown-timer.php?time=201504051144

and want rewrite , create appear url in borwser possibility time param above :

--> http://www.localhost.com/201504051144/timer.gif

actually lastly seek :

--- .htaccess ---

rewriteengine on rewritebase /images/values-locked/ rewriterule ^([a-za-z])?([a-za-z])=([0-9]+)$ $1/timer.gif [qsa]

i not utilize rewrite url way yet still looking doc , topic around.

thanks consideration.

you can utilize code in document_root/.htaccess file:

rewriteengine on rewritebase / rewritecond %{the_request} /images/values-lock/countdown-timer\.php\?time=([^\s&]+) [nc] rewriterule ^ %1/timer.gif? [r=302,l,ne] rewriterule ^([^/]+)/timer\.gif$ images/values-lock/countdown-timer.php?time=$1 [l,qsa,nc]

php .htaccess mod-rewrite url-rewriting

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -