Tell someone how to remove from the file extension in the address bar?
|
2 answers
If we are talking about the expansion of .php in scripts, and if the configuration of the web server is standard, then the simplest option is to create a folder, and in it index.php .
http://domain.com/index.php http://domain.com/folder/index.php http://domain.com/folder/index.php?a=b http://domain.com/folder/index.php?a=b#abcd Same as:
http://domain.com/ http://domain.com/folder/ http://domain.com/folder/?a=b http://domain.com/folder/?a=b#abcd There are more advanced options using mod_rewrite for Apache.
- I look at the question, I look at the answer. And I do not see the connection. What are you both about?) - nikita_sergeevich
- 3
- In this case, I completely agree :) - nikita_sergeevich
- oneHooray, psychics are back) - Sh4dow
|
In htaccess it seems like this:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9]+)$ /$1.php The page will be available on file.php and just file
|