php - Redirect 301 .htaccess not working -
below htaccess , redirect 301 don't works. ideas?
order allow,deny allow options -indexes options +followsymlinks rewriteengine on rewritebase / rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . index.php [l] redirect 301 /index.php?id=4 site.com/newdirectory/
order
directive not needed take out. cannot match query string in redirect
directive utilize rewritecond
of mod_rewrite
instead this:
rewriteengine on rewritebase / rewritecond %{query_string} ^id=4$ rewriterule ^index\.php$ /newdirectory/? [l,nc,r=302] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . index.php [l]
php .htaccess redirect
No comments:
Post a Comment