Link to home
Create AccountLog in
Avatar of smphil
smphilFlag for Afghanistan

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
ASKER CERTIFIED SOLUTION
Avatar of int_20h
int_20h

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of smphil

ASKER

I still can't get it the rewrite working?
Avatar of int_20h
int_20h

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
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.