I'm changing web servers and getting an issue on the new server. The new server is likely more up to date. Old one was using outdated stuff.
Goal
anything.mysite.com/text
should display mysite.com/page.php?p=anything&n=text
Issue
On the new server if a folder named /text
exists then the address bar changes to show anything.mysite.com/text/?p=anything&n=text
and causes other issues. If folder doesn't exist it works fine.
My Code
RewriteCond %{REQUEST_FILENAME} !^.*\.(css|js|jpg|png|gif|php|otf|ttf|woff|eot|svg|bmp|mp3|flv)$
RewriteCond %{REQUEST_FILENAME} !^.*thumb.php$
RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.com$ [NC] #SUB-DOMAINS ONLY
RewriteRule ^(.+/)?([^/]*)$ page.php?p=%1&n=$2 [QSA,L,NC]