I didn't know where to post this because I'm not even sure if it's possible, but if so I'm betting it has something to do with apache...
Is it possible to make it so that if somebody types in http://www.mysite.com/cottages, it will redirect them to http://www.mysite.com/houses but keep the http://www.mysite.com/cottages in the url?
Redirecting, but keeping the url the same
Moderator: General Moderators
You could use mod_rewrite
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I am using these rules.. if I type in mysite.com/cottages/somepage.php, it drops me on mysite.com/accomodations/somepage.php and doesn't change the url, but if I type in mysite.com/cottages it redirects me to mysite.com/accomodations and it shows accomodations in the url... how come??
Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/cottages$ [NC]
RewriteRule (.*) /accomodations [L]
RewriteCond %{REQUEST_URI} ^/cottages/(.*) [NC]
RewriteRule (.*) /accomodations/%1 [L]