Solved

Apache rewrite rule

Posted on 2011-02-20
1
385 Views
Last Modified: 2012-06-22

I am attempting to rewrite http://mysite.com/123456/Insert-Anything-Here 
to
http://mysite.com/page.cfm?page=123456

But only in instances in which what follows http://mysite.com/ is a number, and only in cases in which that number is followed by: /and-something-alpha-numeric-here

I have other rewrite rules that are working, so my presumption is that the issue is not the environment.

Below is what I have that isn't working:

RewriteRule ^/[(0-9+)]/(.*)$ /page.cfm?page=$1 [NC]

Open in new window

0
Comment
Question by:mrjljohnson
[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
1 Comment
 
LVL 16

Accepted Solution

by:
sjklein42 earned 500 total points
ID: 34938673
Sliight prob with your parens.  They belong outside the [0-9]+ thing.

RewriteRule ^/([0-9]+)/(.*)$ /page.cfm?page=$1 [NC]

Open in new window

0

Featured Post

Technology Partners: 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

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

697 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