| | |
.htaccess troubles
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Feb 2008
Posts: 28
Reputation:
Solved Threads: 0
I have a .htaccess file which forwards non www request to www
However, I have a problem if i were to put into the url mysite.com/test.php it will not forward to the www site. Any help on how i can get this fixed would be greatly appreciated. It does work if I just put mysite.com it will forward it to http://www.mysite.com. It just doesn't work when i add mysite.com/test.php
Thanks.
PHP Syntax (Toggle Plain Text)
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
However, I have a problem if i were to put into the url mysite.com/test.php it will not forward to the www site. Any help on how i can get this fixed would be greatly appreciated. It does work if I just put mysite.com it will forward it to http://www.mysite.com. It just doesn't work when i add mysite.com/test.php
Thanks.
•
•
Join Date: Sep 2008
Posts: 337
Reputation:
Solved Threads: 27
Is it a linux server with apache mod-rewrite module installed? Why not use a simple html redirect
•
•
•
•
<meta http-equiv="refresh" content="2;url=http://www.yoursite.com">
Last edited by freshfitz; Mar 9th, 2009 at 1:34 am.
i have tried this..
its worked fine for me...
its worked fine for me...
PHP Syntax (Toggle Plain Text)
Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite\.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Feb 2008
Posts: 28
Reputation:
Solved Threads: 0
•
•
•
•
i have tried this..
its worked fine for me...
PHP Syntax (Toggle Plain Text)
Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite\.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
![]() |
Other Threads in the PHP Forum
- Previous Thread: quiz software
- Next Thread: GetMetaTags Problem
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube






