We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,642 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

url rewriting

Hello i want to use url rewriting in my core php web page site.. can some me help me ??

For Example :-
My web page url link is
www.demo.com/abc.php
i wana to show that page in url like
www.demo.com/abc

can some one tell me how can me solve that probleum ..?

Thanx

5
Contributors
6
Replies
1 Week
Discussion Span
5 Months Ago
Last Updated
7
Views
chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Not in PHP but in your .htaccess file you can put this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

That will remove the .php from the end of the URL

GliderPilot
Posting Whiz in Training
239 posts since Sep 2006
Reputation Points: 34
Solved Threads: 42
Skill Endorsements: 12

Dear GliderPilot,
As per u said to me.i am creat new file with .htaccess (EXE)
and insert your code in that file ..
but its continue is showing the .php (EXE) with my page ..
can u tell me what to do ..? how can me solve that probleum ..?

thanx

chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Here is a website that tells you alot of useful things Click Here. But when in doubt, go to the apache website
Click Here.

fobos
Posting Whiz
345 posts since Feb 2009
Reputation Points: 29
Solved Threads: 67
Skill Endorsements: 3

WHat does (EXE) signify?
The .htaccess should be in the directory of the page that you are viewing, if that makes sense.

diafol
Keep Smiling
Moderator
10,625 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57

Dear diafol,

I mean to say me save that file me with .htaccess...
So can u help me in this probleum ?

Thanx

chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Sorry I don't understand. With what exactly do you need help?

diafol
Keep Smiling
Moderator
10,625 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0712 seconds using 2.65MB