Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Pass http://example.com/10 get http://example.com?path=10

Posted on 2014-03-04
4
Medium Priority
?
210 Views
Last Modified: 2014-03-09
When a user entered http://example.com/10, the browser should pass the url as http://example.com?path=10.

We need an htaccess code for this.

Thank you in advance.
0
Comment
Question by:yahoolane
[X]
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
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 39904790
You will need mod_rewrite enabled in your Apache instance

Try this:

Options +FollowSymLinks
RewriteEngine  on
RewriteRule ^/(.*)$ /?path=$1 [R=301,L]

_or_

Options +FollowSymLinks
RewriteEngine  on
RewriteRule ^/(.*)$ http://www.example.com?path=$1 [R=301,L]
0
 
LVL 1

Accepted Solution

by:
yahoolane earned 0 total points
ID: 39904853
solved.

RewriteEngine on
RewriteRule ^([0-9a-zA-Z]+)$ index.php?path=$1
0
 
LVL 1

Author Closing Comment

by:yahoolane
ID: 39915674
solved my problem
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

609 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