Solved

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

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change local server setting in php 6 104
PHP Apache application gives "Forbidden" message 5 75
contractual requirements for app hosting 3 119
Apache LDAP Authentication 20 51
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
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…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

713 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