|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Our main product page is www.mysite.com/solutions/my-main-product.html, and as our company has grown we have now added more pages on these products these pages all sit in a folder called www.mysite.com/my-main-product/modulename.html, but the main page resides at its origianl URL in 'solutions' as it has all the links, rankings etc.
Now we are putting out a print advert and want to set up a simple url for our main product: www.mysite.com/my-main-product so essentially an index page within www.mysite.com/my-main-product/ So i made the index.html page and then put a 301 redirect in the htaccess that read redirect 301 /my-main-product/ http://www.mysite.com/solutions/my-main-product.html this works fine - only problem is that there are images within the 'my-main-product' folder that are used throughout the site and these links break when that line above is in the htaccess file as the img url link becomes "http://www.mysite.com/my-main-product.html/imagename.gif" the redirect is adding the extension to the image url. is there a way to implement the redirect using htaccess and not have to move all these images OR can i use a javascript redirect, and then block that page from the SEs since it is only for those coming from print media anyhow so the SEs need never ever see www.mysite.com/my-main-product/index.html. would using this JS redirect have any adverse effect on any other pages in my site, espexially the one it is redirecting to, if the SEs never see it? hope i have explained this issue coherently and thanks for any advice offered. |
|
|||
|
Not sure if you have mod_rewrite installed but if you do give this a shot
Code:
RewriteEngine on RewriteRule ^my-main-product/$ http://www.mysite.com/solutions/my-main-product.html [R=301,L] Mike |
|
||||
|
If you are redirecting, why make the person reading the ad type in the extra folder information? Why not just make it URL.com and be done with it?
Instead of using a redirect why not incorporate an index page for this directory? IMO this is the perfect place for a targeted landing page. Do a source code copy of your main page, change the main content to suit, (I include a copy of the print ad as a bit of a visual confirmation for the visitor), and save it as the index page. Reg
__________________
http://DotCom-Productions.com Website Management http://0Grief.com Budget PHP/MySQL hosting |
|
|||
|
Mike smith thanks for that code it works a treat but i have FD search installed and when i put this code into htaccess it stops the FD search from working will look into that.
Reg that's not a bad idea but we have multipl print ads for different modules of the product so would need either multiple trageted landingpages or can just send them to the mian product page as we would prefer to do. thanks for the advice if anyone knows anything about Fluid dYNAMICS SEARCH WOULD BE HUGe help! |
|
|||
|
When you say it stops working, does it display any errors at all?
Also do you have anything else in your .htaccess file? |
|
|||
|
I can't understand why a simple rewrite would prevent access to the server, or cause a forbidden error message.
Unfortunately I don't have much experience with the search engine you are using, but I presume you can block certain directories from being indexed? try blocking the redireted directory (/my-main-product/) and see if that changes anything. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL query works on CLI or Query Browser but NOT in PHP | CraigB | Database Discussion Forum | 4 | 09-28-2006 11:39 AM |
| CSS query | EmmaGale | Web Programming Discussion Forum | 0 | 03-05-2006 08:09 PM |
| CMS Query | syberboy | Web Programming Discussion Forum | 0 | 12-22-2005 08:23 PM |
| Access to MySql to Access | Fendermate | Database Discussion Forum | 3 | 10-06-2005 12:03 PM |
| access database access | tfinch | Web Programming Discussion Forum | 6 | 07-27-2004 11:28 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2010 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |