Is wordpress SEO friendly url works without using htaccess?

Question!

Wordpress uses friendly seo url without using htaccess.

Can any explain this to me please how they do it.

The only way i can think of is to do something like this.

domain.com/index.php/nnn/mmmm/

But wordpress does not use index.php

I know they are not using htaccess.

Please let me know.

Thank you.



Answers

Wordpress does use .htaccess files. You can modify the permalinks in the permalinks section your wordpress site. You can see information on it here.

If you are using IIS you can use this method



Wordpress does actually use .htaccess. Make sure you have hidden files displayed! If you're FTP-ing, there'll be a setting in your client.



To answer the main question:

No.

As for the other points of yours:

Wordpress uses friendly seo url without using htaccess.

USUALLY it does not.
USUALLY it requires the .htaccess to make nice urls work.
However, as Wordpress' Codex says:

If you are using IIS 7 and have admin rights on your server, you can use Microsoft's URL Rewrite Module instead. Though not completely compatible with mod_rewrite, it does support WordPress's pretty permalinks.

So they are always using some kind of rewrite module anyway.

Can any explain this to me please how they do it.


There is one interesting thing to explain:

  • There is only one .htaccess file.
  • Which would not be so interesting if it would contain some kind of general rule rewriting urls to some.php's GET parameters (domain.com/verynice => domain.com/index.php?page=verynice).
  • But that is not happening.

What is happening is that
It rewrites ANY url that is NOT a specific FILE or DIRECTORY to index.php EXCEPT the index.php (to prevent infinite loop).

So urls like domain.com/blah/blah and domain.com/lol/trololo are both actually requesting the index.php - the only difference is in the requested URI.

Using superglobal variables like $_SERVER['REQUEST_URI'] they get the requested URI and after that they parse the requested URI and store the results in varibles accordingly.

The only way i can think of is to do something like this.

domain.com/index.php/nnn/mmmm/

In common explanation of the URL this is NOT request to the index.php file itself.
It is a request for the "mmmm" folder in folder "nnn" which is in folder "index.php".

However apache usually understand this as a request for the index.php file .

For other files e.g. my.file domain.com/my.file is a file request, domain.com/my.file/ is a folder request (notice the slash / at the end)

But wordpress does not use index.php

That is NOT TRUE.

Especially if you are using nice-urls the index.php is practicaly fundamental for Wordpress.

I know they are not using htaccess.

This point of yours could meant 3 things:

  1. They are using the htaccess but not for processing the URL (which I've explained above)
  2. They are not using it at all - not true, unless they would be using the MS' URL Rewrite Module
  3. You don't know. You did not provide any information about how did you find out they are not using it, so we can't know if you really know or you just think that :)

Please let me know.

I let you know. And I hope I've answered all your questions :), if not - use comments :)

Thank you.

You are welcome.

I was happy to help :) ☺ ☺ ☺ ☺ ☺

By : jave.web


This video can help you solving your question :)
By: admin