4

Basically, I was wondering if I could take a url like:

http://Localhost/Core/?page=signin

and rewrite it to

http://Localhost/Core/signin/

like a "fake" folder.

I'm using CSRF and when I submit the form it doesn't like PHP get variables in the url. I was hoping that if I were to use a "fake" folder it would change and then work..? Maybe not, any thoughts?

James519
  • 53
  • 6
  • Similar question to: [http://stackoverflow.com/questions/812571/how-to-create-friendly-url-in-php](http://stackoverflow.com/questions/812571/how-to-create-friendly-url-in-php) – Egel Apr 17 '15 at 13:44

1 Answers1

5

you can write .htaccess rule

RewriteEngine On
RewriteRule ^Core/([^/]*)$ /Core/?page=$1 [L]

Using this your page variable can be access in your php file

Kamran
  • 2,711
  • 2
  • 17
  • 24