Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

htaccess redirect query.


yahalimu

Recommended Posts

My old site had a separate mobile section. (/mobile/...)

Soon to make live new phoenix site which does not need extra mobile pages...

What is the correct htaccess redirect to move all .../mobile/blah_blah.php to ..../blah_blah.php.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, yahalimu said:

Will this also work if using SEO URLS 5 on Phoenix?

If you had a look you would see that I posted 2 versions, one for standard another for SEO URLs

The only page which needs attention is the reviews write URL

Link to comment
Share on other sites

 

 

Apologies I was rushing too much.

I added it to ht access but getting lots of 'Primary script unknown' server log error. (mostly from bots/crawlers)

On investigation it is trying to redirect to a slightly different product URL (using SEU URL5)

For example it is looking for www.XXX.co.uk/object-sileo-300-pr-1474.html when it should be www.XXX.co.uk/object-sileo-300-p-1474.html

and

www.XXX.co.uk/object-sileo-300-mp-1474.html  when it should be www.XXX.co.uk/object-sileo-300-p-1474.html

Can you suggest what I edit the htaccess to correct this? (I am assuming it is the mobile re-direct code causing his)

 

also

www.XXX.co.uk/object-sileo-300-mc-1474.html  when it should be www.XXX.co.uk/object-sileo-300-c-1474.html

 

 
Link to comment
Share on other sites

pr is for the old product_reviews page, it should be changed to product_info.php as well as pri which was for product_reviews_info.php

Change these lines:

    RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpr-([0-9]+).html$ product_reviews.php?products_id=$3 [R=301,NC]
    RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpri-([0-9]+).html$ product_reviews_info.php?products_id=$3 [R=301,NC]

to:

    RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpr-([0-9]+).html$ product_info.php?products_id=$3 [R=301,NC]
    RewriteRule ^(.*?)mobile/([a-z0-9/-]+)-mpri-([0-9]+).html$ product_info.php?products_id=$3 [R=301,NC]

for the second error I have no idea.

These mobile redirects need to be placed BEFORE the seo url redirects. Did you?

Link to comment
Share on other sites

OK Thanks I'll try that.

Yes its at the top, right underneath RewriteBase / and before the SEO URL redirects.

First few minutes in, still getting calls to non existent pr URL's, for products that have never had a review.

The old mobile site has now been switched off so I can't check what settings it had.

 

 

Link to comment
Share on other sites

Excuse me I reuse your post Yahalimu.

Any body can help to redirect old urls -pi- popup img from 2.2 to product page in phoenix now it's resolve with 404 and after several month continuous indexed .

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...