Solved

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

Posted on 2014-03-04
4
207 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

717 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