Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Bring a website to Wordpress.

But maintain exact same URL structure.

         

Broadway

1:39 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have an existing website that has a URL structure like this:

example.com/subdirectory-1/page-1.html

I want to use WordPress as the CMS for this website but I want to maintain the exact same URL structure.
If it matters, I'm only concerned about WordPress "Pages". There's no automation planned here, I'll just create each Page one by one.

How is this accomplished?
What are the terms (title?, URL slug?, permalink?, some plugin?) I need to google for to understand how to do this? Thanks.

TorontoBoy

1:53 am on Sep 19, 2020 (gmt 0)

Broadway

2:25 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Toronto but I need more help in understanding this.
I've been to the WordPress Settings>Permalink page.
On that page, all I see is using some standard variables to automate the URL declaring process.
I do see the variable %postname%, but I can't name the page (give it the title) "subdirectory-1/page-1.html"

I get what a permalink slug is. But when I enter "subdirectory-1/page-1.html" Wordpress transforms it into "subdirectory-1-page-1-html", which isn't what I need.

What page variable do I use to enter "subdirectory-1/page-1.html" and it's not transformed or used as the page's title?

not2easy

2:41 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You can create 'categories' that can be part of your permalink structure. In place of creating physical sub-directories, the use of category in your permalink syntax allows you to maintain the same structure. Since the sub-directories are virtual and will not be the only way for your pages to be reached, you need to put a little extra effort into planning to set up a sitemap structure that lists your preferred structure.

Broadway

2:53 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is an existing site that already has a siloed architecture. So you're saying I would set up each silo as its own "category". And that's the way I'll get the "/" (slash) in the URL. category-1/page.htm category-2/page.htm

Now, how do I get the "page.html" part into the URL without using that as the page title? (when I enter page.html as the "slug" it transforms it into page-html).

Broadway

4:08 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It just seems that just as there is a global variable "postname" that the "permalink slug" should be a variable that can be passed too. Because there does seem to be a mechanism to tack extensions ".html" on to variables.

not2easy

4:16 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Yes, that is how it can be done and more complete information is available at the link above that TorontoBoy posted.

As I'm sure you understand, the .html part of your current URLs is the file extension, as a text file might be .txt or .rtf or .doc; a page of html may be .html or .php or / (no file extension) which is the default for WordPress. There are different ways you can set up your permalink structure to use .html extensions if you need to do that. Some methods involve the use of plugins. If your site uses common ecommerce templates such as woocommerce, you can set it up within their templates.

Broadway

6:31 am on Sep 19, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



OK, thanks.