ASPX dynamic redirecct to wordpress ? htacess (5 posts)

  1. tayssir.ch
    Posted 2 years ago #

    can you help me to find htacess code to redirect this url http://www.mywebsite.com/Auto/UI/CMS.aspx?id=119&lang=ar to http://www.mywebsite.com/?p=199&lang=ar
    199 is the post id Thanks

  2. Master Jumblespeed
    Posted 2 years ago #


    If you wanted to redirect just that file then this code can go in the .htaccess of your root:

    # Redirect the file
    Redirect /Auto/UI/CMS.aspx?id=119&lang=ar http://YOUR_SITE_HERE.com/?p=199&lang=ar
    # Prevent viewing of .htaccess file
    <Files .htaccess>
    order allow,deny
    deny from all

    (The second part prevents viewing of the .htaccess; I prefer using that, but you can remove it if you'd prefer.)

    Of course replace the YOUR_SITE_HERE.com with your site domain.

    Also note that if you change your permalinks this will no longer work as it will redirect to the old permalink.

    Please correct me if my syntax is incorrect.

  3. tayssir.ch
    Posted 2 years ago #

    thanks for your quick reply, but no i need to redirect all Post ID not only 199,
    sorry but aslo i test ur code isn't working too for id 199

  4. Master Jumblespeed
    Posted 2 years ago #

    Let me back up one-
    I see you have WordPress on the http://www.mywebsite.com/?p=199&lang=ar directory but what do you have on the http://www.mywebsite.com/Auto/UI/CMS.aspx?id=119&lang=ar one?

  5. tayssir.ch
    Posted 2 years ago #

    its a aspx, for a x developer,
    i convert the website database to wodpress and i move all post
    and each post has same id , so i want to redirect all link to the new links

Topic Closed

This topic has been closed to new replies.

About this Topic