How do I get my site to read as "site.com/page" instead of "site.com/page.html"?

  • Thread starter Thread starter luckyouaskhole
  • Start date Start date
L

luckyouaskhole

Guest
I want my site to not show the file extension, so it is easier to remember and easier to type, without having to say .php or .html. How do I do that??
 
In addition to the previous suggestion of using directories to accomplish this task, you can also use a rewrite rule to accomplish the same, something like this:

RewriteEngine On
RewriteRule ^(.+)([htm(l)?]|
PHP:
) $1 [L] 

This rule would work for Apache's mod_rewrite and most Microsoft IIS implementations of URL rewriting that supports regular expressions.
 
In addition to the previous suggestion of using directories to accomplish this task, you can also use a rewrite rule to accomplish the same, something like this:

RewriteEngine On
RewriteRule ^(.+)([htm(l)?]|
PHP:
) $1 [L] 

This rule would work for Apache's mod_rewrite and most Microsoft IIS implementations of URL rewriting that supports regular expressions.
 
make a new folder called page in your directory, then rename page.html in the page folder to index.html, by default when you navigate to site.com/page/ , the index page is shown.

Sorry, i typed fast.
 
Back
Top