.htaccess - Htaccess 301 Redirect Issue With External Domain -
basically using registrar 301 redirect domain different domain [example.org] , trying redirect of inner pages using htaccess on [example.org]
problem 1: i'm trying redirect
es/notice.php?file=news.php
to
es/
but though redirection works, appears
es/?file=news.php
problem 2: redirection of individual pages (e.x; len.php /es/) still doesn't work, shows 404
# use php5.4 default addhandler application/x-httpd-php54 .php rewriteengine on options -multiviews rewriteengine on rewritebase / options +followsymlinks rewriterule ^/?pricing$ http://example.org/buy-stuff [r=301,l] rewriterule ^/?stuff-tour$ http://example.org/stuff-stuff-tour [r=301,l] rewriterule ^/?fr/stuff-tour$ http://example.org/stuff-stuff-tour [r=301,l] rewriterule ^/?es/notice.php$ http://example.org/es/ [r=301,l] rewriterule ^/?len.php$ http://example.org/es/ [r=301,l] rewriterule ^/?latest-blog-posts$ http://example.org/blog [r=301,l] rewriterule ^/?por/(.*)$ http://example.org/es/ [r=301,l] rewriterule ^/?nl/(.*)$ http://example.org/ [r=301,l] rewriterule ^/?it/(.*)$ http://example.org/ [r=301,l] #errordocument 404 / rewritecond %{the_request} \.htm rewriterule ^(.*)\.htm$ /$1 [r=301,l] rewritecond %{http_host} ^www\.(.*)$ [nc] rewriterule ^(.*)$ http://%1/$1 [r=301,l] #rewritecond %{http_host} ^www.example.org$ [nc] #rewriterule ^(.*)$ http://example.org$1 [r=301,l] #rewriterule ^([a-za-z]+)/([a-za-z]+)$ $1/$2.htm [nc,l] #rewriterule ^([a-za-z]+)$ $1.htm [nc,l] rewritecond %{request_filename} !-d rewritecond %{request_filename}\.htm -f rewriterule ^([a-za-z\-]+)$ $1.htm rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{http_host} !^\.localhost$ [nc] rewriterule ^(.+[^/])/$ http://%{http_host}/$1 [r=301,l] <files .htaccess> order allow,deny deny </files> options -indexes indexignore *.zip *.txt
Comments
Post a Comment