Forum Moderators: phranque
href="/pagename" from the pages of your site, where "/pagename" is the URL that you want users to "see" in their browser status bar when they hover over the link and "see" in the browser address bar after the link has been clicked. i am looking for an htaccess that changes say subdomain.example.com/blah.html to a new url at example.com/blah.html but if possible the old subdomain index page which would be subdomain.example.com/psp to example.com/psp
I can put an htaccess in each of the subdomains
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.example\.co\.uk [NC]
RewriteCond %{REQUEST_URI} !^/index\.php$
RewriteRule ^(([^/]+/)*[^/.]+)\.(html|php)$ http://www.example.com/$1.html [R=301,L]
RewriteRule ^(index)$ example.com/examplepage.php [R=301,L,NC] RewriteRule ^(([^/]+/)*[^/.]+)\.php$ http://www.example.com/$1.php [R=301,L]
Both with and without brackets around the PHP and it doesnt redirect yet using this does
RewriteRule ^(.*)\.php$ http://www.example.com/$1.php [R=301,L]