Forum Moderators: phranque
RewriteCond %{HTTP_HOST} ^mysite\.es
RewriteRule ^como_funciona.php how_it_works.php [L] RewriteCond %{HTTP_HOST} ^mysite\.es
RewriteRule ^como_funciona.php how_it_works.php
RewriteRule ^how_it_works.php como_funciona.php [R=301, L]
# Externally redirect [i]direct client requests only[/i] for
# URL example.es/how_it_works.php to URL example.es/como_funciona.php
RewriteCond %{HTTP_HOST} ^example\.es
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /how_it_works\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^how_it_works\.php$ http://www.example.es/como_funciona.php [R=301,L]
#
# Internally rewrite requests for URL /example.es/como_funciona.php
# to script filepath /how_it_works.php
RewriteCond %{HTTP_HOST} ^mysite\.es
RewriteRule ^como_funciona\.php how_it_works.php [L]
# Externally redirect direct client requests only for
# URL example.es/how_it_works.php to URL example.es/como_funciona.php
RewriteCond %{HTTP_HOST} ^example\.es
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /how_it_works\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^how_it_works\.php$ http://www.example.es/como_funciona.php [R=301,L]
#
RewriteCond %{HTTP_HOST} ^example\.fr
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /how_it_works\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^how_it_works\.php$ http://www.example.fr/comment_faire.php [R=301,L]
#
# Internally rewrite requests for URL /example.es/como_funciona.php
# to script filepath /how_it_works.php
RewriteCond %{HTTP_HOST} ^example\.es
RewriteRule ^como_funciona\.php how_it_works.php [L]
#
RewriteCond %{HTTP_HOST} ^example\.fr
RewriteRule ^comment_faire\.php how_it_works.php [L] [edited by: jdMorgan at 12:12 pm (utc) on Feb 10, 2010]
[edit reason] Please use example.com only. [/edit]
Order Allow,Deny
#Deny from 151.**.221.940
Allow from all
ErrorDocument 404 /404.php
RewriteEngine on
RewriteRule ^robots.txt robots.php
RewriteCond %{HTTP_HOST} ^example\.es
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /come_funziona\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^come_funziona\.php$ http://www.example.es/como_funciona.php [R=301,L]
RewriteCond %{HTTP_HOST} ^example\.es
RewriteRule ^como_funciona\.php come_funziona.php [L] [edited by: jdMorgan at 12:31 pm (utc) on Feb 10, 2010]
[edit reason] Please use example.com only [/edit]
RewriteCond %{HTTP_HOST} ^example\.es
RewriteCond %{HTTP_HOST} ^www\.example\.es
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /come_funziona\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^come_funziona\.php$ http://www.example.es/como_funciona.php [R=301,L]
#
RewriteCond %{HTTP_HOST} ^example\.fr
RewriteCond %{HTTP_HOST} ^www\.example\.fr
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /come_funziona\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^come_funziona\.php$ http://www.example.fr/comment_faire.php [R=301,L]
#
RewriteCond %{HTTP_HOST} ^example\.es
RewriteCond %{HTTP_HOST} ^www\.example\.es
RewriteRule ^como_funciona\.php come_funziona.php [L]
#
RewriteCond %{HTTP_HOST} ^example\.fr
RewriteCond %{HTTP_HOST} ^www\.example\.fr
RewriteRule ^comment_faire\.php come_funziona.php [L][/
# Externally redirect direct client requests for script filepath to language-specific URL
RewriteCond %{HTTP_HOST} ^www\.example\.es
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /come_funziona\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^come_funziona\.php$ http://www.example.es/como_funciona.php [R=301,L]
#
# Externally redirect non-canonical non-www hostname requests to canonical www hostname
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+\.(co\.)?[a-z]{2})\.?(:[0-9]+)?$
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
#
# Internally rewrite language-specific URL requests to script filepath
RewriteCond %{HTTP_HOST} ^www\.example\.es
RewriteRule ^como_funciona\.php come_funziona.php [L]