1,105,328 Community Members

url rewriting

Member Avatar
chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
GliderPilot
Posting Whiz in Training
296 posts since Sep 2006
Reputation Points: 31 [?]
Q&As Helped to Solve: 48 [?]
Skill Endorsements: 14 [?]
 
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

Member Avatar
chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
fobos
Posting Whiz
351 posts since Feb 2009
Reputation Points: 19 [?]
Q&As Helped to Solve: 68 [?]
Skill Endorsements: 3 [?]
 
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.

Member Avatar
diafol
Where are my eyes?
12,977 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,848 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 

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

Member Avatar
chira9na9pal
Newbie Poster
16 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Dear diafol,

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

Thanx

Member Avatar
diafol
Where are my eyes?
12,977 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,848 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article