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 helper library?
Why should I store logs in a database rather than a file?
How does php and apache work?
Tell me how is it possible to know the number of rows returned in result set?
What is the difference between $argv and $argc? Give example?
How to know user has read the email-php?
Explain what are some new features introduced in php7?
How can I maintain the count of how many persons have hit my site?
1 Answers MTOG, Rushmore Consultancy,
Is it easy to learn wordpress?
Explain me how failures in execution are handled with include() and require() functions?
Php being an open source is there any support available to it?
What is composer install?