?
Solved

another .htaccess question

Posted on 2006-03-21
8
Medium Priority
?
248 Views
Last Modified: 2010-04-09
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
0
Comment
Question by:smphil
5 Comments
 
LVL 3

Accepted Solution

by:
int_20h earned 672 total points
ID: 16251463
0
 
LVL 1

Author Comment

by:smphil
ID: 16252117
I still can't get it the rewrite working?
0
 
LVL 3

Expert Comment

by:int_20h
ID: 16252249
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
0
 
LVL 1

Assisted Solution

by:hkey_current_user
hkey_current_user earned 664 total points
ID: 16267724
why not just put this in the head of the HTML document:

<meta http-equiv="refresh" content="0;URL=thepage.php" />
0
 
LVL 20

Assisted Solution

by:Muhammad Wasif
Muhammad Wasif earned 664 total points
ID: 16380042

RewriteEngine On
RewriteRule ^mypage\.html$ thepage.php [L]
RewriteRule ^onepage\.html$ pages.php [L]

But for this you need to enable mod_rewrite
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question