mod rewrite - Re-writing URLs with an ending forward slash -
i have quick question re-writing urls. pages re-written such
mysite.com/edit.php -> mysite.com/edit/ mysite.com/search.php -> mysite.com/search/
along should still able take parameters
mysite.com/edit.php -> mysite.com/edit/?id=2
this have far doesn't take ending /
it's mysite.com/edit
rewritecond %{document_root}/%{request_filename} !-f rewritecond %{document_root}/%{request_filename} !-d rewritecond %{document_root}/%{request_filename}\.php -f rewriterule ^(.+)$ /$1.php [l,qsa]
also, extra, possible not allow users add .php
if tried to? example if had /edit.php
, got working /edit/
or /edit
, user tried type in /edit.php
wouldn't work.
Comments
Post a Comment