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 the difference between htmlentities() and htmlspecialchars()?
Do you know what is php?
What is regex in html?
How can you declare a constant variable in php?
What are html entities?
1.Where are the sessions storing ? 2.What are the contents of a session file ? 3.If the server is loaded with too many session files there is a possibility of server crash. How can we solve this issue? 4. How does php server identify that the particular session belongs to particular user ? For ex: If two users A and B logged from different machine, separate session files (say 1 and 2) will be created in the server. But how the php knows that 1 belongs to A and 2 belongs to B ?
Write a program in php to print a table of a number?
What is the importance of "method" attribute in a html form?
What is php and features of php?
Is php session id unique?
Declare a new variable in php equal to the number 3;
Does php support multiple inheritances?