Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mod_rewrite - Question


Andreas2003

Recommended Posts

Posted

Hi there,

 

I had to move my domain up one folder (closer to root), because I had to get rid of a startup page, which prevents indexing from spiders.

 

My former URL was : www.domain.com/shop/.....

 

and my new one should be : www.domain.com/.....

 

 

Can anyone give my a short instruction, how to set up a rewrite rule in my htaccess,

so that all traffic to www.domain.com/shop/ is being redirected to www.domain.com ?

 

I also want to combine that with a 301 "Moved permantently" message to the spiders.

 

Next question would be, if this is the correct and SEO-friendly way to do that ?

 

Thanks in advance,

kind regards

Andreas

 

PS: Sorry if I cant get myself clear enough. If so, please ask me again.

Posted

In a .htaccess file inside the 'shop' folder.

 

redirect 301 / http://www.yourdomain.com/

 

Vger

Posted

Hi,

 

with that, I'm creating an endless loop.

 

I need a redirection, that redirects all (formerly existing) pages from osC from www.domain.com/shop/*

to www.domain.com/*

so that www.domain.com/shop/page1.php will be redirected to www.domain.com/page1.php

and that www.domain.com/shop/page2.php will be redirected to www.domain.com/page2.php and so on ...

 

Thanks for your support,

kind regards

Andreas

Posted

Now I have :

RewriteEngine on

Redirect 301 /shop/ http://www.domain.com/

 

and it seems to be working.

 

What are search engines doing with that 301 error code ?

Are they learning from that and taking the new address ?

Are they all learning ?

 

 

Thanks in advance,

kind regards

Andreas

Posted

Hi there,

 

it only seems to be working, but not correctly.

 

Now I have a redirection (with a.m.) from

www.domain/shop/product_info.php?products_id=5428

 

to (only)

 

www.domain/product_info.php

 

So, my htaccess misses the parameter to give the exact settings to the new URL

And on the new address, the spider only gets a "product not found". Thats not good.

 

Any ideas how to modify my htaccess ?

 

Thanks

Regards

Andreas

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...