[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Mod_Rewrite help for a noob please

Posted on 2011-10-05
4
Medium Priority
?
232 Views
Last Modified: 2012-05-12
I want to rewrite all URLs of the form:

http://www.site.com/push20/dir1/dir2/afile.html

to

http://www.site.com/dir1/dir2/afile.html

I.e. lose the 'push20' bit

Ive tried with:

   RewriteEngine On
   RewriteRule   ^push20/(.*) /$1 [R]

Open in new window


but its not happening....

Suggestion please!
0
Comment
Question by:arndale65
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 36918540
Looks good if put in .htaccess
Have You put that in .htaccess or apache config file?
0
 

Author Comment

by:arndale65
ID: 36918585
httpd.conf
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 1000 total points
ID: 36918815
If in httpd.conf then (note the leading slash change)

   RewriteEngine On
   RewriteRule   ^/push20/(.*) /$1 [L,R]
0
 

Author Closing Comment

by:arndale65
ID: 36918962
That's it! - thanks a million
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

872 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