mod_rewrite issue
Moderator: Thorsten
mod_rewrite issue
Hi,
I am having some trouble configuring the mod_rewrite. I have setup a webserver with a single ip that hosts different platforms (phpmyfaq, drupal and phpipam to be precise). My phpmyfaq is reacheble thru a dns entry. When I configure apache's mod_rewrite everything work correctly when is use the ip/phpmyfaq url. When I use the dns entry instead it exhibits some unexpected behaviour, mod_rewrite works correcdtly for the menu entry but it doesn't for the category and content.
What should I do?
Thanks,
Giorgio Apuzzo
I am having some trouble configuring the mod_rewrite. I have setup a webserver with a single ip that hosts different platforms (phpmyfaq, drupal and phpipam to be precise). My phpmyfaq is reacheble thru a dns entry. When I configure apache's mod_rewrite everything work correctly when is use the ip/phpmyfaq url. When I use the dns entry instead it exhibits some unexpected behaviour, mod_rewrite works correcdtly for the menu entry but it doesn't for the category and content.
What should I do?
Thanks,
Giorgio Apuzzo
Re: mod_rewrite issue
Hi,
what errors do you get exactly?
bye
Thorsten
what errors do you get exactly?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
Hi,
I get a not found page.
E.g.:
"
Not Found
The requested URL /content/7/9/it/rimuovere-ctrlaltcanc-windows-7.html was not found on this server.
"
Giorgio
I get a not found page.
E.g.:
"
Not Found
The requested URL /content/7/9/it/rimuovere-ctrlaltcanc-windows-7.html was not found on this server.
"
Giorgio
Re: mod_rewrite issue
Hi,
is the RewriteBase in .htaccess correct?
bye
Thorsten
is the RewriteBase in .htaccess correct?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
Yes, everything works except content and category..
Re: mod_rewrite issue
Hi,
can I check your FAQ somewhere?
bye
Thorsten
can I check your FAQ somewhere?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
It's in the intranet, I can only share some of the config files.
Let me know what you need.
Thx,
Giorgio
Let me know what you need.
Thx,
Giorgio
Re: mod_rewrite issue
Hi,
I need as much info as possible.
bye
Thorsten
I need as much info as possible.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
This are the configuration I made:
.htaccess
=========
Options +FollowSymlinks -MultiViews -Indexes
# if you want to use mod_rewrite, set this 'On'
RewriteEngine On
# the path to your phpMyFAQ installation
RewriteBase /kb/
Apache Virtual Host
=================
<VirtualHost *:80>
ServerName kb.be-trentino.it
DocumentRoot "/var/www/kb"
<Directory "/var/www/kb">
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Do you need more?
Thx,
Giorgio
.htaccess
=========
Options +FollowSymlinks -MultiViews -Indexes
# if you want to use mod_rewrite, set this 'On'
RewriteEngine On
# the path to your phpMyFAQ installation
RewriteBase /kb/
Apache Virtual Host
=================
<VirtualHost *:80>
ServerName kb.be-trentino.it
DocumentRoot "/var/www/kb"
<Directory "/var/www/kb">
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Do you need more?
Thx,
Giorgio
Re: mod_rewrite issue
Hi,
the RewriteBase is wrong, it should be
instead of
bye
Thorsten
the RewriteBase is wrong, it should be
Code: Select all
RewriteBase /
Code: Select all
RewriteBase /kb/
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
Hi,
now I get that when I go to the kb thru the dns name I get the default apache page instead of the phpmyfaq.
Thx,
Giorgio
now I get that when I go to the kb thru the dns name I get the default apache page instead of the phpmyfaq.
Thx,
Giorgio
Re: mod_rewrite issue
Hi,
after reading your configuration I assume the FAQ should be available under http://kb.be-trentino.it/, right? So the RewriteBase should be / as there's no other directory from this URL...
bye
Thorsten
after reading your configuration I assume the FAQ should be available under http://kb.be-trentino.it/, right? So the RewriteBase should be / as there's no other directory from this URL...
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
Hi,
Actually that rewrite rule is correct as it is.
It's the apache virtual host configuration that doesn't work because when I visit the kb.be-trentino.it the browser displays the standard apache "it works" page that is located in the /var/www folder instead of redirecting to the /var/www/kb folder but I cannot understand why...
Actually that rewrite rule is correct as it is.
It's the apache virtual host configuration that doesn't work because when I visit the kb.be-trentino.it the browser displays the standard apache "it works" page that is located in the /var/www folder instead of redirecting to the /var/www/kb folder but I cannot understand why...
Re: mod_rewrite issue
Hi,
did you restart Apache?
bye
Thorsten
did you restart Apache?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: mod_rewrite issue
yes, many times..
Thx,
Giorgio
Thx,
Giorgio