0

I have the URL:

www.website.com/planets.php?ppp1=mars&ppp2=venus

Searching through stackoverflow, I modified one of the existing solutions to externally redirect it like this:

RewriteCond %{THE_REQUEST} ^GET\s([^.]+)\.php\?ppp1=([^&\s]+)\&ppp2=([^&\s]+) [NC]
RewriteRule ^ %1/%2/%3? [R,L]

This will turn the URL to this:

www.website.com/planets/mars/venus

Now, everything is working great so far, but I don't know how to setup the back-reference RewriteRule so that when typing "www.website.com/planets/mars/venus", that it forwards back to the original URL. In essence, how to back-reference 2 Get variables?

chiwangc
  • 3,428
  • 16
  • 23
  • 31
CST Cris
  • 1
  • 1
  • I'm confused with the question. If `/planets/mars/venus` work, then what is the problem? What do you mean by back-reference? – ariefbayu Apr 16 '15 at 08:28
  • Please see the linked duplicate. You're using rewrite rules backwards. If the duplicate doesn't entirely clear it up for you, update your question with new insights and reply. – deceze Apr 16 '15 at 08:33

0 Answers0