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 reference variable php?
Can php replace javascript?
Specify array sort functions available in php ?
How are sessions maintained?
What is php simple definition?
Which is better #define or enum?
Does php need to be installed?
How can we find the number of rows in a result set using PHP?
How many requests will be send to server and response coming from server when you open a web page (e.g. xyz.php) which has an image tag?
What is isset function in php?
Hi, My Name is Ajay Jha. What My Question is I am Percuing in Bca. It's My 5th Semester. I Want To Make My Carrear as a web designer that's Why i wants to do Php, Is it right Desision for Me ?
Does php have block scope?