简体   繁体   中英

how to make .htaccess ignore specific uri part

I don't know how to make a rewrite condition to obtain the right behaviour.

This is the link i have:

http://www.example.com/ variable /Known/Uri/ecc

or

http://www.example.com/ variable

I'd like to ignore the "variable" part and consider only the rest of the uri. I will consider "variable" only when reading $_SERVER["REQUEST_URI"].

I think what you want to do is:

RewriteEngine On
RewriteRule ^[^/]+(.*)$ $1 [L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM