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 file upload?
what is the diffrence between for and foreach?
11 Answers Hirolasoft, IBM, Photon,
Tell me what is the difference between ereg_replace() and eregi_replace()?
What are the two types of variables?
What is polymorphism with example in php?
What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?
What IS PHP?
Require_once(), require(), include(). What is difference between them?
List few sensible functions in PHP?
What is a composer?
Starting or restarting a computer is called
How to set cookies in PHP?