regex - mod rewrite is not working and not giving any error -
we want change links "www.example.com/page/login/" "www.example.com/sayfa/giris". tried this: rewriterule ^page/^(.+[^/])$/ /sayfa/^(.+[^/])$ [l]
nothing change. there error?
thank response @geert3 , @anubhava. trying failed. here .htaccess content:
rewriteengine on rewritebase / rewritecond %{request_uri} ^(.*)/{2,}(.*)$ rewriterule . %1/%2 [r=301,l] rewritecond %{request_uri} /+[^\.]+$ rewriterule ^(.+[^/])$ %{request_uri}/ [r=301,l] rewriterule /(uploads/.*) $1 [r=301,l] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ page.php?url=$1 [qsa,l]
you can use code in document_root/.htaccess
file:
rewriteengine on rewritebase / rewritecond %{request_uri} ^(.*)/{2,}(.*)$ rewriterule . %1/%2 [r=301,l] rewritecond %{request_uri} /+[^\.]+$ rewriterule ^(.+[^/])$ %{request_uri}/ [r=301,l] rewriterule /(uploads/.*) $1 [r=301,l] rewriterule ^sayfa/giris/?$ /page/login [l,nc] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ page.php?url=$1 [qsa,l]
- make sure there not .htaccess in
/sayfa/
folder.
Comments
Post a Comment