Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2958
Redirect old URLs
Results 1 to 12 of 12

Thread: Redirect old URLs

  1. #1
    I am around... Sadiq_b's Avatar
    Join Date
    Oct 2005
    Location
    India
    Posts
    1,807

    Default Redirect old URLs

    Heylo and Salaam

    Does this site run on apache? If it does it might be wise to include a small .htaccess rule redirecting all old forums.understanding-islam.com links to the current URL.

    A case in point is this post. I often spend some time reading old posts, and it can get a little irritating if links are all dead. I can give the .htaccess rule in case the server is using apache on a linux box.
    [Offtopic] I spend my time on my Oracle Forums and my General Forums [/Offtopic]

    [Ontopic] To compare translations of the Quran and read Tafsir Jalalayn, refer Quran.com [/Ontopic]

  2. #2
    Administrator Ratatosk's Avatar
    Join Date
    Aug 1984
    Posts
    4,827

    Default Re: Redirect old URLs

    Heylo,

    That'd be Chuck's jurisdiction, I believe. Anyhow, I fixed the post so there'll be a bit less of a pain to follow that age-old thread.

    Regards,
    think

  3. #3
    I am around... Sadiq_b's Avatar
    Join Date
    Oct 2005
    Location
    India
    Posts
    1,807

    Default Re: Redirect old URLs

    heylo again...

    Ok then perhaps Chuck can look into it. It's not a question of age-old threads, just about maintaining correct links. And it's a small matter really. Just include a few lines in a file called .htaccess and lo an behold! your links redirect by themselves!

    Salaam
    [Offtopic] I spend my time on my Oracle Forums and my General Forums [/Offtopic]

    [Ontopic] To compare translations of the Quran and read Tafsir Jalalayn, refer Quran.com [/Ontopic]

  4. #4
    Administrator Ratatosk's Avatar
    Join Date
    Aug 1984
    Posts
    4,827

    Default Re: Redirect old URLs

    Ya, editing the .htaccess is a cinch. We used to have a random four-oh-four changing daily from a vast pool of semi-random URLs. We had to let that go, because the redirects themselves 404'd...

    Well, y'know.., as they say: "heylo".
    think

  5. #5
    Former Hadith Rejector
    Join Date
    Aug 2008
    Location
    USA
    Posts
    2,060

    Default Re: Redirect old URLs

    Some of the links from the main site are broken too. What helps make them work is adding an x after .asp

    Is that going to be fixed soon ^_^.?
    To anyone reading my posts:
    I used to be hadith rejector. After studying hadith at a surface level, I realized the large amount of nonsense dispelled by this forum and their top users. The exemptions are Al Boriqi, Nawawi, Lumumba and hlatif (who is no longer here). My advice, leave this forum. If you read anything of me rejecting hadith, know that it is nonsense and I no longer hold that view. Read my "Bio" for more info.

  6. #6
    I am around... Sadiq_b's Avatar
    Join Date
    Oct 2005
    Location
    India
    Posts
    1,807

    Default Re: Redirect old URLs

    Quote Originally Posted by Ratatosk View Post
    Ya, editing the .htaccess is a cinch. We used to have a random four-oh-four changing daily from a vast pool of semi-random URLs. We had to let that go, because the redirects themselves 404'd...

    Well, y'know.., as they say: "heylo".
    It's not a cinch. You probably had a double redirect. It can be fixed (like fixing those who say "heylo" ) Give me access for a day, I can fix them inshallah.

    Quote Originally Posted by aamantubillah View Post
    Some of the links from the main site are broken too. What helps make them work is adding an x after .asp

    Is that going to be fixed soon ^_^.?
    That too can be fixed by a htaccess redirect provided there arent any more pages with .asp as extensions else even those will start redirecting.
    [Offtopic] I spend my time on my Oracle Forums and my General Forums [/Offtopic]

    [Ontopic] To compare translations of the Quran and read Tafsir Jalalayn, refer Quran.com [/Ontopic]

  7. #7
    Administrator Ratatosk's Avatar
    Join Date
    Aug 1984
    Posts
    4,827

    Default Re: Redirect old URLs

    Salam,
    Quote Originally Posted by Sadiq_b View Post
    You probably had a double redirect.
    That, plus some silly low-level file swapping. 'Twas silly. And it didn't really work. Plus it wasn't really funny, either. 'Twas just made as a proof-of-concept, I think. It's gone now. And it's never coming back.
    Quote Originally Posted by Sadiq_b View Post
    those who say "heylo"
    I know, those are silly, too.
    Quote Originally Posted by Sadiq_b View Post
    Give me access for a day, I can fix them inshallah.
    I think the heylo people don't need to be fixed at all, they're harmless.

    Chuck, you're reading this?

    Regards
    think

  8. #8

    Default Re: Redirect old URLs

    i don't know about .htaccess coding, if you have a script I'll put it there.



  9. #9
    I am around... Sadiq_b's Avatar
    Join Date
    Oct 2005
    Location
    India
    Posts
    1,807

    Default Re: Redirect old URLs

    Quote Originally Posted by Chuck View Post
    i don't know about .htaccess coding, if you have a script I'll put it there.
    Actually I can't just write a redirect rule without looking at your other htaccess rules. It might not work or break things. If it's ok give me ftp access by PM for a day. I will fix it up. You can change the FTP pass after one day... Don't worry I won't break anything.
    [Offtopic] I spend my time on my Oracle Forums and my General Forums [/Offtopic]

    [Ontopic] To compare translations of the Quran and read Tafsir Jalalayn, refer Quran.com [/Ontopic]

  10. #10
    Senior Member
    Join Date
    Jul 2009
    Posts
    298

    Default Re: Redirect old URLs

    As-Saalam Alaykum.

    I don't have a problem viewing old archives of threads. Maybe give me a link to the post you are having a problem with,insha'Allaah.
    -Yanal


  11. #11
    Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default Re: Redirect old URLs

    From the format of your new URLs it looks like you're using mod_rewrite already. If that's the case, you may be able to redirect the current URLs by adding an [L] flag to your existing RewriteRules to tell the server that this the last rule which should be obeyed and it should stop rewriting now, and then add in some RewriteCond / RewriteRule pairs to handle changing the old style urls to the new style.

  12. #12
    I am around... Sadiq_b's Avatar
    Join Date
    Oct 2005
    Location
    India
    Posts
    1,807

    Default Re: Redirect old URLs

    Quote Originally Posted by Stromberion View Post
    From the format of your new URLs it looks like you're using mod_rewrite already. If that's the case, you may be able to redirect the current URLs by adding an [L] flag to your existing RewriteRules to tell the server that this the last rule which should be obeyed and it should stop rewriting now, and then add in some RewriteCond / RewriteRule pairs to handle changing the old style urls to the new style.
    Salaam Stromberion

    This was an old discussion. The URL problems, since then have been fixed!

    Regards
    [Offtopic] I spend my time on my Oracle Forums and my General Forums [/Offtopic]

    [Ontopic] To compare translations of the Quran and read Tafsir Jalalayn, refer Quran.com [/Ontopic]

Similar Threads

  1. Creationists rewrite natural history
    By MF in forum University of Cut-n-Paste
    Replies: 0
    Last Post: 11th October 2007, 05:37
  2. finding urls with texts and replacing them
    By vinod in forum Technical Support
    Replies: 5
    Last Post: 2nd May 2005, 12:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •