954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Change Url PHP File

Hello everyone ! I need a code that displays my URL friendly,
Normally,
URL : www.domain.com/externalpage.php?page=12

Now i need my URL Like this
www.domain.com/externalpage/pageid/

Is there any way for this ??:)

mohamedasif18
Junior Poster in Training
61 posts since Nov 2011
Reputation Points: 10
Solved Threads: 5
 

There is a way to change the url,You have to change some changes in htaccess file.this will be located in php folder.while installing php you will be having a folder called php.

and change the script to

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]//change only these three lines

jyothirpatil
Newbie Poster
2 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Hi jyothirpatil !, Thank you for your reply . Another question is, How to create .htaccess file and where i want to save that, Is that i want to save it the root_folder(public_html) ? Could you pls explain

mohamedasif18
Junior Poster in Training
61 posts since Nov 2011
Reputation Points: 10
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: