Is it possible for htaccess to interpret a file as a directory (subdomain)? [duplicate]

0

I have several files with various contents, type: ayuda.php? go = faq, ayuda.php? go = form, etc. I would like something like: help.site.com/faq, help.site.com/form, etc. Is it possible via htaccess that the help.php file be interpreted as a directory?

    
asked by anonymous 28.03.2016 / 19:49

1 answer

0

Your link tags and how you will open your content will have to change yourself. So where did you use it:

ajuda.php?go=faq

Now you will write:

ajuda.php/faq

Your rules need to translate the friendly to the querystring.

RewriteRule ^([a-z]+)\/?$ ajuda.php?go=$1 [NC,L]
  
    

It's very simple to do this. I recommend a read here.

  
    
28.03.2016 / 20:21