Link to home
Start Free TrialLog 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
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial