0
Welcome Guest! Login
0 items Join Now

SOLVED Add .php to url's

    • randelld's Avatar
    • randelld
    • Hero Rocketeer
    • Posts: 427
    • Thanks: 1

    SOLVED Add .php to url's

    Posted 10 years 3 months ago
    • Hi,
      Since rebuilding my site my url's no longer have the .php suffix.
      Old url = industrial-transport.php
      New url = industrial-transport

      I know that in config I can turn on add suffix but this adds .html

      Does anyone have a solution for me to get the .php back in my url's please

      Many Thanks
    • Last Edit: 10 years 3 months ago by randelld.
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Add .php to url's

    Posted 10 years 3 months ago
    • Hi there,

      Why would you have URLs suffixed with .php? Surely this will just cause users to get a 404 Error - File not found as it would be looking for a php file called industrial-transport.php

      Perhaps you could explain further and provide a link to the problem.

      Hope this helps 8)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information
    • randelld's Avatar
    • randelld
    • Hero Rocketeer
    • Posts: 427
    • Thanks: 1

    Re: Add .php to url's

    Posted 10 years 3 months ago
    • Hi David,
      Sorry, I'll explain a bit more. Before I re-built the site all of our page URL's were like this
      services.php, about-us.php, contact-us.php

      After the rebuild the URL's are like this
      services, about-us, contact-us, etc
      Normally this wouldn't be an issue really but we have done a lot of offsite SEO work for the site so the existing backlinks that we have are throwing up 404 errors

      Thanks for taking the time
      Dean
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Add .php to url's

    Posted 10 years 3 months ago
    • Hi Dean,

      If all your urls were ending as .php then I am confused as to how that would be displayed as php does not get displayed by browsers. Do you have a link to one of these php pages so I can see what is happening please.

      In any case, the best way forward would be to take all your previous URLs and write 301 redirects rather than try and display files in a way that was never intended.

      Hope this helps 8)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information
    • randelld's Avatar
    • randelld
    • Hero Rocketeer
    • Posts: 427
    • Thanks: 1

    Re: Add .php to url's

    Posted 10 years 3 months ago
    • Hi Dave,
      We don't have the old site any more so I can't show you it. Lots of our sites have had the .php extension to the pages in the past. I believe Joomla used to have an option to choose which extension to add at the end of page url's.
      I'm going to take your advice and write 301 redirects for the 404 links.

      Thanks for your help.

Time to create page: 0.065 seconds