Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

static php pages help


Guest

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...