网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   X-Cart (https://www.0058.net/forumdisplay.php?f=70)
-   -   Redirect home.php (https://www.0058.net/showthread.php?t=4573)

topvip 2013-11-08 10:20 AM

Redirect home.php
 
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

yahoo 2013-11-08 10:24 AM

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
Additionally, in htaccess, you need some kind of rewrite so that sportsglasses123.com and www.sportsglasses123.com are identical, with a 301... AND while you're at it, force the admin to https. Something like this:


########################
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.


All times are GMT +8. The time now is 07:54 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.