Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to change the url from saying php to not saying php?

Posted on 2011-03-09
2
266 Views
Last Modified: 2012-06-21
I have a website that uses php. Right now, if somebody goes to one of the pages it shows something like this "test.com/example.php?id=23543" I need to change it so it says something like "test.com/example-23543" with no php or ? showing. How would I do that? I'd like to do it in the htaccess if possible.
0
Comment
Question by:anotherdotcommer
2 Comments
 
LVL 4

Accepted Solution

by:
WhiteSeed earned 250 total points
ID: 35083437
You'll want to use mod_rewrite, a module available in apache. This will be managed by an .htaccess file within your web directory. AddedBytes has a nice tutorial for beginners on url-rewriting.
http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/
0
 
LVL 29

Assisted Solution

by:Randy Downs
Randy Downs earned 250 total points
ID: 35083440
if you just have a few of these you could do it manually like this - http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Decrypt string by php 7 46
Number of reviews not counting correctly 2 22
Delete  php pages of a part of our site 8 31
How do I show metrics with PHP or Javascript 6 31
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question