homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Going From PHP CMS to HTML - Maintaining URLs

5+ Year Member

Msg#: 4416442 posted 9:50 pm on Feb 10, 2012 (gmt 0)


I am working with a client who has a website set up with PHP based CMS. The CMS is proprietary to the host.

Here is what I am trying to achieve and the problems limiting me.

- I only know HTML / CSS, with the main focus on SEO, conversion optimization. PHP is mystery to me, and although I would love to learn it, this wont happen for a while.

- Their website is set up with PHP based CMS, proprietary to the host.

- I much prefer HTML / CSS, therefore I copied the website on my hard drive in HTML.

The problem is that all the URLs on the LIVE website do not have .html extensions, however my copy on the hard drive does.

For instance, the live website URL structure goes like this: website.com/about_us

What I have is website.com/about_us.html

When we transfer the host, and I upload the copy on the server, all the pages will have the .html extensions.

The biggest problem in this are Google rankings and links. Since Google shows website.com/about_us and all links point to website.com/about_us.

When I change that to HTML I am risking loosing rankings and links.

The only solution I thought of so far is 301 redirect of each page to the new .html extension.

Was wondering if anyone would be able to suggest other options.



WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4416442 posted 2:47 am on Feb 11, 2012 (gmt 0)

An internal rewrite using a RewriteRule could solve the URL problem. Continue with extensionless URL requests on the web and rewrite the request so that a .html file serves the content without revealing the name of the file. It's a couple of lines of code at the most.

You do not want a redirect using Redirect or RedirectMatch.
You do not want a redirect using a RewriteRule.
You do want a rewrite using a RewriteRule.

However, dumping the CMS sounds crazy. You lose the ability for timely updates to the site, the ability to make site-wide changes in one edit and a whole host of other useful features.

If you're migrating off the current host, you should be migrating to a new CMS. If that's not urgent, take the time to learn PHP and mySQL and do the job properly.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved