htaccess redirect but keep URL (2 posts)

  1. somefool
    Posted 11 years ago #

    OK, ive googled and googled and googled for this but perhaps my lack of knowledge of htaccess has meant Im looking for the wrong keywords.
    If I have a page http://www.mysite.com/about.php how do I make it so that http://www.mysite.com/about redirects to http://www.mysite.com/about.php but still leaves http://www.mysite.com/about in the browsers URL.
    Indeed if someone typed http://www.mysite.com/about/index.php, or http://www.mysite.com/about/whatever/they.type how can that get redirected in the same way to http://www.mysite.com/about.php
    If possible id also like http://www.mysite.com/shortname/ to redirect to http://www.mysite.com/longername/ this time with all the WP /month/day/year URL stuff working and if possible showing the shortname URL.
    hopefully this is possible ;-)
    cheers in advance

  2. somefool
    Posted 11 years ago #

    OK, i think ive done it, well atleast partially
    in my .htaccess file it goes like this
    RewriteRule ^about(.*) /about.php
    RewriteRule ^about /about.php
    that seems to redirect myurl/about to the right page

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.