![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 117.95.51.246
|
|||
|
|||
|
Hi
when we type www.sportsglasses123.com in the browser it will redirect to home.php then it becomes http://www.sportsglasses123.com/home.php can we stop it i meam when we type www.sportsglasses123.com in the browser it shoudl just stay http://www.sportsglasses123.com not http://www.sportsglasses123.com/home.php thanks |
|
#2
IP: 117.95.51.246
|
|||
|
|||
|
If you have access to the .htaccess file.
Your first line of htaccess should be: Code:
DirectoryIndex home.php index.php index.html index.htm ######################## RewriteEngine on RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /home\.php\ HTTP/ RewriteRule ^(.*)home\.php$ / [R=301,L] ##################### Note, you do not need to input the first two lines if they are already in the .htaccess file. Hope this helps. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| htaccess 301 redirect tutorial | yahoo | 服务器环境搭建 | 0 | 2009-09-06 12:45 AM |
| 关于Cpanel的一点小知识 | car | 虚拟主机 | 0 | 2008-04-13 01:34 AM |
| 301 Redirect 永久重定向的实现 | yahoo | 搜索引擎优化 | 0 | 2008-01-21 12:51 AM |
| Canonical Domain Resolution | yahoo | 建站交流 | 0 | 2007-08-20 08:13 AM |
| How to redirect more domains in one folder via .htaccess | smiling | 建站交流 | 1 | 2007-08-18 01:14 AM |