Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by

Hi all,

I have managed to get the friendly URLs working on Windows Server with IIS7. I had to use a web.config file with some rewrite rules to get it working. It should work up to 2 levels deep, accomodating the whole site.

The problem I have is that All of the links throughout the site are preceeded with a '.' and are not relative. This means that when you are on page 'domain.com/admin' and you click on the tags link, it takes you to 'domain.com/admin/tags'.

I need to remove this from all links, is this possible in a config file?


3 Answers

+1 vote
Best answer

This question has been answered here by 'gidgreen'




0 votes

It sounds like this isn't working similarly enough to the .htaccess file for Apache, and that's why the relative links aren't working. Is it setting the qa-rewrite parameter with the full path, including forward slashes?

0 votes

Using Url rewrites with lls7 is a simple process and it rewrite the urls the same as using htaccess file to do it.

Open Internet Service manager

Click on your site name

In the middle section hit the Url Rewrite

After it is open hit the import rules on the right side.

add the rewrites below in the rewrite rules in the middle section

RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

Hit the Apply button on the top right

Go to your admin on your site and choose the top rewrite button

It will not show a green box because windows can not read the htaccess file

but choose the top button anyway and all rewrites will work the same as Apache web server

Hope this helps the windows users