Fixed subfolder friendly URL problem

Asked

Viewed 38 times

2

I’m having a problem with httaccess when including a fixed subfolder.

The intention is to have a folder in front of the website domain. Example: www.meudominio.com.br/guest/500 link to the page www.meudominio.com.br/guest?id=500.

But that rule only works with www.meudominio.com.br/guest and it doesn’t work with others.

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^([^\.]+)$ $1.php [NC,L]

RewriteRule  ^guest/([^\.]+) guest.php?id=$1 [NC,L] 

With the previous code, the forwarding even worked, but I think it gave some error in the server, because it did not load any file (from css to img).

  • this question helps you? https://answall.com/questions/55315/url-amigavel-htaccess-problema?rq=1

  • I tried to use the example above and it didn’t work. What I need is for htaccess to work only when the url is directed in www.meudominio.com.br/guest/{GET}.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.