Solved

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

Posted on 2011-03-09
2
260 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

821 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