![]() |
Rewrite rule not work !
Hello :
It is appear Rewrite_mode rule not worked on sever , this is important rule for almost user. Example : RewriteCond %{HTTP_HOST} ^dl\.lianportal\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.dl\.lianportal\.com$ RewriteRule ^/?$ "http\:\/\/lianportal\.com" [R=301,L Thanks |
try:
RewriteEngine On RewriteCond %{HTTP_HOST} ^dl\.lianportal\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.dl\.lianportal\.com$ RewriteRule ^(.*)$ http://lianportal.com/$1 [R=301,L] |
Quote:
RewriteCond %{HTTP_HOST} ^dl\.lianportal\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.dl\.lianportal\.com$ RewriteRule ^/?$ "http\:\/\/lianportal\.com" [R=301,L] Note that it is for URL contains with "/" or "" ONLY, not for everything else. If you need rewrite for everything else, you should use RewriteRule ^/(.*)$ "http\:\/\/lianportal\.com/$1" [R=301,L] / (slash after ^) is needed if rules are in httpd.conf. No need in .htaccess. You can put 'RewriteLogLevel 9' in the httpd.conf to enable rewrite logging and grep REWRITE entry in error_log for debugging. |
| All times are GMT -7. The time now is 03:29 PM. |