2
Very simple to doubt. Redirect by . htaccess containing a wildcard and hash subdomain.
Of:
http://carros.domain.com/visualizar#123
http://casas.domain.com/visualizar#345
http://aps.domain.com/visualizar#567
To:
http://domain.com/carros/ver#123
http://domain.com/casas/ver#345
http://domain.com/aps/ver#567
My biggest problem is changing the "view" to the "view".
I tried countless ways and failed in the mission.
Something approximate I found here in the stack:
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com/visualizar
RewriteRule ^(.*)$ http://domain.com/%1/ver/$1 [L,NC,QSA]
EDIT:
Solution that worked based on the answers of these beautiful people:
RewriteCond %{HTTP_HOST} carros\.domain\.com
RewriteCond %{REQUEST_URI} visualizar([^#]+)?([#\d\w\s]+)?
RewriteRule (.*) http://domain.com/ver%1%2 [R=301,L]
I repeated that to all my subdominios.
So show me what you tried.
– Daniel Omine
I added the example I’m working on
– Pedro
You can explain better if this has to work with multiple domains or if parts like "Domain.com", "cars" are fixed?
– Sergio
No, the domain is fixed. Already the "cars" is wildcard. I gave an improved in the examples. See if I was clear.
– Pedro