I'm having a problem with .htaccess
At this time I have something like this:
http://example.com/page-example?getVariable=1234
But I want something like:
http://example.com/page/example/1234
I tried to use that .htacces to replace the hyphens with slashes
Options +FollowSymlinks -MultiViews
RewriteRule ^([^/]+)-([^/]+).php/?$ /$1/$2 [R,L]
And I got something like this
http://example.com/page/example?getVariable=1234
But the server can't find the path, I think it's because it admits that the 'page' is a folder.
How can I do what I want to, but the server search for the file 'page-example.php' at the root folder and not for 'example.php' at '/page/' ?
PS: I'm using already the code below to remove the .php extension and the 'www.' from the URL.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php