Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3957162
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:27:20+00:00 2026-05-20T02:27:20+00:00

I’ve setup a yourls.org (URL shortening service) on a windows 2003 VPS server I

  • 0

I’ve setup a yourls.org (URL shortening service) on a windows 2003 VPS server I have, using ISAPI rewrite. I already have ISAPI rewrite installed and working with WordPress, so I know that is working. I have used the rules suggested from the page:

http://code.google.com/p/yourls/wiki/htaccess

In my ISAPI rewrite, but the redirects are not working. The page is looping, trying to redirect to itself.

I’m not familiar with Rewrite rules so any help would be appreciated. The rules I’ve applied are:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (/|\.php|/[^.]*)$  [NC]
RewriteRule ^(.*)$ /yourls-loader.php [L]

I added the third conditional line based on something I found in the wiki of the application.

If anyone could shed any light on why this isn’t working, I’d appreciate it.

T

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:27:21+00:00Added an answer on May 20, 2026 at 2:27 am

    Ok, this took me all day, but I got it working. For anyone interested, there was absolutely nothing wrong with the ISAPI rewrite. The problem was in the code. In a file called yourls-loader.php, there’s a line that checks the url, deconstructs it and reconstructs it. The problem is that it always forces the new url into https. If you’ve no security cert on your server it won’t work!!!

    //$scheme = ( isset($_SERVER["HTTPS"]) ? 'https' : 'http' );
    //$request = str_replace( YOURLS_SITE.'/', '', $scheme . 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    $request = str_replace( YOURLS_SITE.'/', '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    

    The first 2 lines are commented out, this is what was here. As I trust and know how my server is setup (cause I did it myself) I don’t feel any need for this check system.

    One other thing to be aware of on a Windows system is that you will have to add the suggested Server_URI parse at the start of this file too.

    if (isset($_SERVER['HTTP_X_REWRITE_URL'])){
        $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
    }
    

    I hope this helps someone… It’s taken me all day to resolve with no online support.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.