- Posts: 241
Question Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP
- Jefferson49
- Topic Author
- Offline
- Junior Member
Less
More
3 weeks 3 days ago - 3 weeks 3 days ago #1
by Jefferson49
Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP was created by Jefferson49
While using WAMP for one of my webtrees installations, I set up a virtual host "webtrees", which is linked to the folder with the webtrees installation (in my case: C:\wamp64\www\webtrees).
The base_url in config.ini.php is defined as follows:
base_url="https://webtrees"
With this virtual host defined, I can start webtrees by simply typing "webtrees/" into the browser line. This works fine for "ugly" URLs.
However, webtrees stops working and creates an 404 errror "Not Found - The requested URL was not found on this server" if pretty URL are activated.
In the FAQ, I found the following sentences:
Regarding 2): I use the following two lines. Do I need to change them?
base_url="https://webtrees"
rewrite_urls="1"
The base_url in config.ini.php is defined as follows:
base_url="https://webtrees"
With this virtual host defined, I can start webtrees by simply typing "webtrees/" into the browser line. This works fine for "ugly" URLs.
However, webtrees stops working and creates an 404 errror "Not Found - The requested URL was not found on this server" if pretty URL are activated.
In the FAQ, I found the following sentences:
- "Dynamic pages are generated by index.php. All non-static URLs should be mapped onto /index.php"
- "Secondly, you must tell webtrees to generate pretty URLs. You do this by adding/changing two lines in the file data/config.ini.php"
Regarding 2): I use the following two lines. Do I need to change them?
base_url="https://webtrees"
rewrite_urls="1"
Last edit: 3 weeks 3 days ago by Jefferson49. Reason: Some text was wrongly shown as code
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
3 weeks 3 days ago #2
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP
1 Yes - but I have limited internet right now, so can't tell you what
2 No
2 No
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- JustCarmen
- Offline
- Elite Member
3 weeks 3 days ago #3
by JustCarmen
Carmen
Designer of the JustLight theme (comes with a light and dark color palette), Fancy Imagebar, Fancy Research Links and Fancy Treeview for webtrees 2
Check my website at www.justcarmen.nl
Replied by JustCarmen on topic Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP
I have also been using WAMP for a few years now with webtrees as a virtual host and pretty urls.
I think you are missing the .htaccess file in the root of webtrees, with this piece of code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L]
I think you are missing the .htaccess file in the root of webtrees, with this piece of code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L]
Carmen
Designer of the JustLight theme (comes with a light and dark color palette), Fancy Imagebar, Fancy Research Links and Fancy Treeview for webtrees 2
Check my website at www.justcarmen.nl
Please Log in or Create an account to join the conversation.
- Jefferson49
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 241
3 weeks 3 days ago #4
by Jefferson49
Replied by Jefferson49 on topic Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP
Thank you very much Carmen and Greg. I created a .htaccess like proposed by Carmen and webtrees started without the 404 error. Everything just fine!
Out of curiousity: Do I need the .htaccess file on every webtrees installation on WAMP? Or is it only relevant for this specific virtual host configuration?
Out of curiousity: Do I need the .htaccess file on every webtrees installation on WAMP? Or is it only relevant for this specific virtual host configuration?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
3 weeks 3 days ago #5
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Pretty URLs create 404 error if webtrees runs directly on a virtual host in WAMP
It's needed for pretty URLs on servers using apache.
Different config is required for different webservers
See webtrees.net/faq/urls/
Different config is required for different webservers
See webtrees.net/faq/urls/
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.