ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
   
 
Categories  >>  Software  >>  Scripts  >>  PHP
 
 


 

 
 PHP interview questions  PHP Interview Questions
 ASP interview questions  ASP Interview Questions
 CGI Perl interview questions  CGI Perl Interview Questions
 JavaScript interview questions  JavaScript Interview Questions
 VB Script interview questions  VB Script Interview Questions
 JSP interview questions  JSP Interview Questions
 Shell Script interview questions  Shell Script Interview Questions
 Python interview questions  Python Interview Questions
 Tcl interview questions  Tcl Interview Questions
 Awk interview questions  Awk Interview Questions
 AJAX interview questions  AJAX Interview Questions
 Ruby on Rails interview questions  Ruby on Rails Interview Questions
 Scripts AllOther interview questions  Scripts AllOther Interview Questions
Question
How we can convert dynamic url into static url? plz provide
code.
 Question Submitted By :: Asn
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How we can convert dynamic url into static url? plz provide code.
Answer
# 1
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 ?    1 Yes 3 No
Udit Rawat
 

 
 
 
Other PHP Interview Questions
 
  Question Asked @ Answers
 
Which is the best method to fetch the data from mysql? 1.mysql_fetch_array() 2.mysql_fetch_object() 3.mysql_fetch_row() 4.mysql_fetch_assoc()  4
How can i change the extension name like i have a page which name aboutme.php but i want to show it aboutme.php3 or aboutme.aspx?  3
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com  3
•How to access crystal reports through PHP code? Satyam1
HOW we can use css IPsoft3
What is a procedure in php? Wipro5
In how many ways we can retrieve the date in the result set of mysql using PHP? Yahoo5
How can you access a COM object from a PHP page?  1
How can I retrieve values from one database server and store them in other database server using PHP? Photon2
Who is the father of PHP and explain the changes in PHP versions? Genpact13
what method is used to get a user's IP address?  2
is 'easyphp' is compelete technology to design a phpmysql site?  3
 
For more PHP Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com