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 |
Where is the functions php in wordpress?
What is static method php?
What is form action php?
What type of operation is needed when passing values through a form or an url?
how to convert PHP code in to java code
How do you check if a variable has not been set in php?
How many ways to include array elements in double-quoted strings using php?
What is meant by content management system?
3 Answers Global Logic, IBEE, TCS, Toyota,
How to call php function in jquery?
Difference between mysql_connect and mysql_pconnect?
How do you check is php not empty?
What are psrs? Choose 1 and briefly describe it?