.htaccess - PHP GET Variable containing forward slashes rewrite -


i'm trying achieve following:

rewrite:

http://url.com?subfolder=folderone/foldertwo/folderthree 

to:

http://url.com/subfolder/folderone/foldertwo/folderthree 

and call $_get['subfolder'] within php, should retrieve folderone/foldertwo/folderthree

this works expected when defining ?subfolder= not following tries find folder path:

rewriteengine on rewriterule ^subfolder/([^/.]+)/?$ index.php?subfolder=$1 [l] 

is above possible?

thanks!

use one:

rewriteengine on rewriterule ^subfolder/(.*)$ index.php?subfolder=$1 [l] 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -