I searched this problem in the site, but I couldn’t find a solution.
I have a php page, call
http://www.domain.com/topic.php?name=xyz
I want to call this page with
http://www.domain.com/topic/xyz
What I tried is;
RewriteEngine On
RewriteRule ^topic/([^/]*)$ /topic.php?name=$1 [L]
However because of this "/" I get 404 error. If I try "-" instead of "/" it works. I guess "/" forward user to folder "/topic" so I need a solution to fix it.
I found my solution to problem. It is a bit late though 🙂
I edit my .htaccess such that
I create a redirect.php as you see. In this file, I explode slashes, then by using if statement I set
As you see setting $_GET as a code isn’t handsome, but it works like a charm! 🙂 Thanks all for your helps.