sitemap  |  contact

Sakic.Net Forum
20 November 2008, 14:58 *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Email Directory goes free: http://www.sakic.net/products/free_products/
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: About redirect /index.php  (Read 2379 times)
netfly
Jr. Member
**
Posts: 56


View Profile
« on: 17 February 2008, 03:48 »

Hello Saka,

I created a redirect from mydomain.com/index.php to mydomain.com
However, I have a problem with other url containing index.php in the name. For example I use Google Search integrated to my joomla site. The results are displayed into a page in my website. Google Search open a new page with url /index.php?domains=mydomain.com&q=keyword&sitesearch=domain.com&sa=Google+Search&client=etc.
In this case, the page is redirected to mydomain.com

Do you know if there is a solution to prevent this problem?

Best Regards.
Logged
Saka
Administrator
Hero Member
*****
Posts: 1,291


View Profile WWW
« Reply #1 on: 17 February 2008, 04:15 »

Sure,

Use this one in your .htaccess (replace yoursite.com with your own domain):

After: RewriteEngine On

# Redirect requests to index.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.yoursite.com/ [R=301,L]

Before: # RewriteBase /
Logged

netfly
Jr. Member
**
Posts: 56


View Profile
« Reply #2 on: 17 February 2008, 17:30 »

It's absolutely PERFECT Emir  Grin Cheesy Grin Cheesy Grin

One more SEO improvement in my website. I'm actually high ranked in Google and Yahoo. SEFadvance is part of this success.

Thanks a lot  Wink
Logged
Pages: [1]
  Print  
 
Jump to: