Jump to content

htaccess in 3.0.62 doesn't work in later version


pwfans
 Share

Recommended Posts

Hello,

1. Anybody can help, why this htaccess (location in root) doesn't work at 3.0.98 ? it show 404

RewriteEngine on
RewriteRule ^(.*)$ /subdirectory/$1 [L]

That rule works in 3.0.62
It redirect root request to subdirectory processwire installation and hiding the subdirectory name in url.

I have try to uncomment htaccess inside subdirectory processwire installation :

RewriteBase /pw/
to
RewriteBase /subdirectory/

Doesn't help, still 404 when open the site from root domain.

2. Is there anyway to find processwire version from processwire files ? not from admin login page.

Thank you.

Link to comment
Share on other sites

9 hours ago, pwfans said:

2. Is there anyway to find processwire version from processwire files ? not from admin login page.

It is at the top of: /wire/core/ProcessWire.php

9 hours ago, pwfans said:

doesn't work at 3.0.98 ?

Are you sure? Maybe you overlooked something? As far as I know, nothing has changed in PW which should make it fail if it worked previously.

In the forums, there are various discussions on serving PW from a subdirectory, maybe this one is a good starting point: https://processwire.com/talk/topic/15520-processwire-install-on-a-sub-directory/

 

  • Like 2
Link to comment
Share on other sites

Yes i'm pretty sure, clean install 3.0.62 , 3.0.96 and 3.0.98
Start from 3.0.96 i can't use : 

RewriteRule ^(.*)$ /subdirectory/$1 [L]

Below code work but not hiding subdirectory in URL

RewriteRule ^(.*)$ /subdirectory [L]

Yes i have tried all method i found in this forum and stackoverflow, none work yet.

 

11 hours ago, szabesz said:

It is at the top of: /wire/core/ProcessWire.php

Thanks for this, yes it is there.

  • Like 1
Link to comment
Share on other sites

31 minutes ago, pwfans said:

Below code work but not hiding subdirectory in URL


RewriteRule ^(.*)$ /subdirectory [L]

Have you tried this:

On 2/10/2017 at 11:56 AM, szabesz said:

Also $config->urls->root = '/'; must probably be present in /site/config.php to get page()->url return the url segments without the subfolder being part of it, more on this: https://processwire.com/api/ref/page/url/

Link to comment
Share on other sites

  • 2 weeks later...

Unfortunately, still didn't work.
End up using alternate solution: using symlink, not really pretty like htaccess but similar result.

@szabesz
BTW thanks for helping to references, indirectly that refer to alternate solution above.

Edited by pwfans
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...