How we can convert dynamic url into static url? plz provide
code.
Answers were Sorted based on User's Feedback
Answer / sun
Save the page as .html and not .php!
simple as that!
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / udit rawat
Add an .htaccess file(if using apache)
# Turn on URL rewriting
RewriteEngine On
RewriteBase /
# Allow any files or directories that exist to be displayed
directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]
This redirects all urls to index.php. index.php will be some
sort of front controller that loads scripts based on the url
So in your example:
localhost/mywebsite/mypage
| Is This Answer Correct ? | 3 Yes | 4 No |
What is csrf cookie?
What is the difference between indexed and associative array?
find highest salary
Tell me how is it possible to parse a configuration file?
Name and explain five of the PHP error constants?
What is php and sql used for?
What are the rules in creating php variable?
How to upload a file (may be a .txt or a .doc file) from a php script/file?
What is strcmp?
How can MYSQL functions be available with PHP?
What is a class in php programing?
What are the advantages of PHP over HTML?
11 Answers Infosys, Torque Infotech,