Dear all,

I have a website in which I am using the following htaccess code to hide the file extension

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

I then manually removed the .php extension from the entire website.

Now when I am generating a site map for many of my pages are getting generated twice. One with the php extension and one without the php extension.

Can someone explain to me what is wrong and how to fix this?

Thank you. Your help will be much appreciated.

Regards

Recommended Answers

when I am generating a site map

How do you generate the sitemap ?

Jump to Post

All 4 Replies

when I am generating a site map

How do you generate the sitemap ?

So it generates pages with and without the php extension I guess? You have to make sure the generator can't find those. Most likely, your website still has links to both URL's.

Yes thanks. I found out the problem. One of my webpages still had links to php. Thanks for guidance. :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.