regex - Generator URL Friendly SEO PHP with .htaccess -
so want create url friendly hidden variable, , this:
website.dev/en/page/detail.html (work, show content)
.htaccess file
options +followsymlinks -multiviews rewriteengine on rewritebase / rewriterule ^([^/]+)/([^/]+)/([^/]+)/(.*)$ index.php?lang=$1&page=$2&detail=$3 [l,qsa,nc] rewriterule ^([^/]+)/([^/]+)/(.*)$ index.php?lang=$1&page=$2 [l,qsa,nc] rewriterule ^([^/]+)/(.*)$ index.php?lang=$1 [l,qsa,nc]
php file:
$_get['lang']); // en $_get['page']); // page $_get['detail']); // detail.html
so, page return error status 500, show me content
http://i.stack.imgur.com/qgv5m.png
how can fix ?
you can use:
options +followsymlinks -multiviews rewriteengine on rewritebase / # skip files , directories rewrite rules below rewritecond %{request_filename} -d [or] rewritecond %{request_filename} -f rewriterule ^ - [l] rewriterule ^([^/]+)/([^/]+)/([^/]+)/(.+)$ index.php?lang=$1&page=$2&detail=$3 [l,qsa] rewriterule ^([^/]+)/([^/]+)/(.+)$ index.php?lang=$1&page=$2 [l,qsa] rewriterule ^([^/]+)/(.+)$ index.php?lang=$1 [l,qsa]
Comments
Post a Comment