.htaccess - How to make my url looks cool with htaccess -
regulars question :p
current url
http://domain.com/index.php http://domain.com/index.php?page=submit-hosting http://domain.com/index.php?page=popular-hosting how write .htaccess make current url this
when user type
http://domain.com/index.phpurl returnhttp://domain.com/withoutindex.phpand page with
$_get['page']http://domain.com/submit-hosting/
let me know :)
from google got
to remove index.php or index.html
rewritecond %{the_request} \ /(.+/)?index\.(html?|php)(\?.*)?\ [nc] rewriterule ^(.+/)?index\.(html?|php)$ ./$1 [r=301,l] to make end slash
rewritecond %{script_filename} !-f rewriterule [^/]$ %{request_uri}/ [r=301,l] rewritecond %{request_uri} ^(/.*[^/])/?$ rewritecond %{document_root}%1.php -f rewriterule ^([^/]+)/?$ ./$1.php [qsa,l] to make /page-name/
rewriterule ^([^/]*)/$ ./index.php?page=$1 [qsa,l] any simple or better one?
Comments
Post a Comment