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 are the encryption functions in php?
Write the statements that are used to connect php with mysql
how to run PHP in command line?
8 Answers InfoShore, Ramp Green, Xtreeme,
How do I start a php session?
How do you define a constant in php?
Explain mail function in PHP with syntax?
How can I embed a java programme in PHP file and what changes have to be done in PHP.ini file?
1 Answers Sify, Small Biz Express,
Why is php used for web development?
What is user defined function in php?
Tell me what is the actually used php version?
Does exist in php?
What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these?