Enable URL Rewriting in Windows server

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Suggested Hosts
Post Reply
yandr
Registered User
Posts: 15
Joined: Thu Oct 28, 2021 12:51 pm

Enable URL Rewriting in Windows server

Post by yandr »

I am new to phpBB and have set it up recetly with a fresh install (no content - planning to migrate).

I am trying to set-up URL rewrites, however I am not running Apache.

I have 2 issues:

1. Even after enabling the option 'Enable URL Rewriting' and flushing the cache, the URL's remain the same
2. If I just translate .htaccess file to web.config, will I be able to have this up and running? Is there a guide somewhere on the my issue I can follow?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: Enable URL Rewriting in Windows server

Post by Mick »

Whilst we try our best we are not server gurus especially with IIS. Does the server have URL rewriting enabled? I’ve just Google searched the issue and there seems to be plenty of information on the subject such as adding rewrite modules etc, you should try that avenue first. These are the first two I saw: https://www.iis.net/downloads/microsoft/url-rewrite and https://tecadmin.net/enable-url-rewrite-iis/ etc.

Out of curiosity is there any particular reason you’re using IIS? There are plenty of personal server packages out there using Apache etc, see: Knowledge Base - Installing and Setting Up Your Own Web Server.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
rockedge
Registered User
Posts: 73
Joined: Sat Nov 30, 2019 9:10 pm

Re: Enable URL Rewriting in Windows server

Post by rockedge »

I have run phpBB sites using the web server Hiawatha. It uses it's own native URL Toolbox in it's configuration file to perform the URL rewrites which works with "translated" Apache2 URL rewrite syntax. Meaning I was able to duplicate the necessary rewrites by converting the Apache .htaccess and what it does to fit the Hiawatha method.

I would guess that by duplicating what the Apache URL rewrite is doing in the .htaccess file in the correct corresponding configuration locations for the web server you are running will do the trick.
yandr
Registered User
Posts: 15
Joined: Thu Oct 28, 2021 12:51 pm

Re: Enable URL Rewriting in Windows server

Post by yandr »

Mick wrote: Fri Nov 05, 2021 10:03 am Whilst we try our best we are not server gurus especially with IIS. Does the server have URL rewriting enabled? I’ve just Google searched the issue and there seems to be plenty of information on the subject such as adding rewrite modules etc, you should try that avenue first. These are the first two I saw: https://www.iis.net/downloads/microsoft/url-rewrite and https://tecadmin.net/enable-url-rewrite-iis/ etc.

Out of curiosity is there any particular reason you’re using IIS? There are plenty of personal server packages out there using Apache etc, see: Knowledge Base - Installing and Setting Up Your Own Web Server.
The server has indeed URL rewrite already enabled.

The rest of the site is in ASP and currently the forum is in that technology as well.

My first issue is that after enabling the URL rewrite in phpBB, it still generates the old URL format with the parameters (e.g. viewforum.php?f=5)
Johnny Mctash
Registered User
Posts: 30
Joined: Mon Oct 01, 2018 5:53 am

Re: Enable URL Rewriting in Windows server

Post by Johnny Mctash »

yandr wrote: Sat Nov 06, 2021 3:22 pm My first issue is that after enabling the URL rewrite in phpBB, it still generates the old URL format with the parameters (e.g. viewforum.php?f=5)
Perhaps you should read the description of that option more carefully, as it doesn't do what you think it does.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3738
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Enable URL Rewriting in Windows server

Post by Kailey »

Johnny Mctash wrote: Sat Nov 06, 2021 5:04 pm
yandr wrote: Sat Nov 06, 2021 3:22 pm My first issue is that after enabling the URL rewrite in phpBB, it still generates the old URL format with the parameters (e.g. viewforum.php?f=5)
Perhaps you should read the description of that option more carefully, as it doesn't do what you think it does.
Indeed.
When enabled, URLs containing ’app.php’ will be rewritten to remove the filename (i.e. app.php/foo will become /foo).
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
My little corner of the world, where I sometimes post things documented from my job.
yandr
Registered User
Posts: 15
Joined: Thu Oct 28, 2021 12:51 pm

Re: Enable URL Rewriting in Windows server

Post by yandr »

Hmmm, and what is the purpose of that?
Post Reply

Return to “phpBB Discussion”