Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Remove .php extension from subdomain URLs? Reply To: Remove .php extension from subdomain URLs?

#145787
asiek
Participant

@traq If I am understanding correctly…then yes I do.

Full .htaccess file//

RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.example\.com$
RewriteRule ^/?$ "http\:\/\/example\.com\/test" [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^\.]+)/$ $1.php