Guest Posted July 30, 2011 Posted July 30, 2011 I noticed that I am getting a log of 404 in my webmaster tools. In the midst of trying to figure it out I noticed that all my static php pages will load the same page with anything after the php in the url. Example www.site.com/index.php will load the same page as www.site.com/index.php/anything/you/put/here both will load the index.php page or www.site.com/new_products.php will load the same page as www.site.com/new_products.php/anything/you/put/here both will load the new_products.php page This happens on all my .php pages. How do I make it so it 404s the requests for the .php/anything/you/put/here I dont want them to just load the page like the url is correct, I want it to 404 it. My .html pages 404 the requests for .html/anything/you/put/here example www.site.com/product_x.html works and www.site.com/product_x.html/anything/you/put/here will 404 Not sure why the .php/anything pages dont 404 like the .html/anything pages Please help me Thank you
Guest Posted July 31, 2011 Posted July 31, 2011 I have tested this on other OSC sites and seen the same results. There must be some way to turn it off. Anyone know please. Thanks
PupStar Posted July 31, 2011 Posted July 31, 2011 I have tested this on other OSC sites and seen the same results. There must be some way to turn it off. Anyone know please. Thanks try this http://addons.oscommerce.com/info/933
satish Posted July 31, 2011 Posted July 31, 2011 You need to define some htaccess rule to get this done. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Guest Posted July 31, 2011 Posted July 31, 2011 Yes. It can be done in .htaccess I just don't know how to do it. Can anyone help or link me to somewhere that can? Thanks
BryceJr Posted August 2, 2011 Posted August 2, 2011 Yes. It can be done in .htaccess I just don't know how to do it. Can anyone help or link me to somewhere that can? Thanks Create a folder and place your error pages in it. Open your htacccess located in the root of your site with a good text editor and add these. ErrorDocument 404 /errorpages/pagenotfound.html ErrorDocument 403 /errorpages/forbidden.html ErrorDocument 500 /errorpages/internalserver.html The sample above assumes your "errorpages" folder is inside the root directory of your site. If your "errorpages" folder is inside "catalog" folder, those entries would look like this. ErrorDocument 404 /catalog/errorpages/pagenotfound.html ErrorDocument 403 /catalog/errorpages/forbidden.html ErrorDocument 500 /catalog/errorpages/internalserver.html
Recommended Posts
Archived
This topic is now archived and is closed to further replies.