0

I'm trying to extract company name from a URL;

www.example.com/company-name/

The URL will always be prefixed with the company name.

How can I extract this but allow access to files/folders that exist?

Here's what I currently have, its returning a 404;

RewriteRule ^([a-z,A-Z,0-9,-]+)/?$ /?CompanyName=$1 [NC,L,QSA]

N.B. Would prefer not to implement a controller

atoms
  • 2,993
  • 2
  • 22
  • 43
  • thanks Croises, the answer is rewriting from ^blog/ I would like to rewrite from base. – atoms Nov 08 '16 at 11:42
  • You're getting a RTFM response because there's nothing even slightly unique about your use case. You could find hundreds of articles and answers that would solve it. – Walf Nov 09 '16 at 07:07

0 Answers0