smphil
asked on
another .htaccess question
Can I redirect pages wqith .htaccess
I need when the page "mypage.html" is called for to direct it to "thepage.php"
I also need it to the same thing for these 2 pages
"onepage.html" needs to direct to "pages.php"
If so how can I write this.
Thanks
I need when the page "mypage.html" is called for to direct it to "thepage.php"
I also need it to the same thing for these 2 pages
"onepage.html" needs to direct to "pages.php"
If so how can I write this.
Thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Ok, try the following in you httpd.conf:
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /mypage.html http://www.yourdomain.com/thepage.php
Redirect permanent /onepage.html http://www.yourdomain.com/pages.php
</IfModule>
Remember to change yourdomain for your real domain... also make sure the directory matches
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /mypage.html http://www.yourdomain.com/thepage.php
Redirect permanent /onepage.html http://www.yourdomain.com/pages.php
</IfModule>
Remember to change yourdomain for your real domain... also make sure the directory matches
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER