0

I am using this platform to know more about a trend of publishing articles in Wordpress in a specific pattern. Today I encountered a site with the following URL: eg: www.xyz_sitename.com/site/random_php_filename.php?some_key=slug-of-an-article The site is created in Wordpress and I am very much curious to know how these kinds of pages are generated in Wordpress.

Is there some kind of plugin responsible for this or custom work?

I researched to figure this out, but no luck. Can anyone help me to understand this technique of presenting articles in a single PHP file with varying query params?

Example: http://www.meganjoy.ca/site/ui492i7.php?3ffb60=citroen-c1-used-cars-for-sale-in-north-west

  • Editing your question to include a specific example of a URL you'd like to make and where it should go in regular Wordpress URL's will allow a more specific answer – mozboz Jun 30 at 9:32
0

The site you linked isn't a Wordpress.

You can make custom Wordpress URL's using Wordpress's URL Rewrite API. See https://codex.wordpress.org/Rewrite_API/add_rewrite_rule#Example , e.g.:

function custom_rewrite_basic() {
  add_rewrite_rule('^anythinghere/([0-9]+)/?', 'index.php?page_id=$matches[1]', 'top');
}
add_action('init', 'custom_rewrite_basic');

This makes a new URL format like yoursite.com/anythinghere/95

If that doesn't meet your needs you can also edit .htaccess

Editing your question to include a specific example of a URL you'd like to make and where it should go in regular Wordpress URL's will allow a more specific answer. For example, your question could include a format of a URL you want: e.g.: yoursite.com/foo/bar/hello.php?id=1234567 and a description of where you want the URL to go: "I want this URL to go to post ID 1234567"

| improve this answer | |
  • I get your point but the homeurl is a WordPress site. – NinjaMAN Jul 1 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.