Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have about .htaccess and mod_rewrite question.
#1
My system is use ehcp 0.37.3.b on ubuntu 14.04.
I have upload webpage include .htaccess.But it's will show not found.
Follow is .htaccess:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.+)-([0-9]+)-([0-9]+)\.phtml$ index.php?action=$1&id=$2&layer=$3
RewriteRule ^t/(.+) index.php?action=tagkey&key=$1
RewriteRule ^key/(.+)/(.+) index.php?action=search&dir=$2&key=$1
RewriteRule ^key/(.+) index.php?action=search&key=$1
RewriteRule ^(.+)-(.+)/(.+)/(.+)/(.+)\.phtml$ index.php?action=service&module=$1&fun=$3&permit=view&id=$2&bid=$5&p=$4 [L]
RewriteRule ^(.+)-(.+)/(.+)/(.+)\.phtml$ index.php?action=service&module=$1&fun=$3&permit=view&id=$2&bid=$4 [L]
RewriteRule ^(.+)-(.+)/(.+)/ index.php?action=$1&id=$2&p=$3
RewriteRule ^(.+)-(.+)/ index.php?action=$1&id=$2
RewriteRule ^article/(.+)/(.+)/ index.php?action=article&id=$1&p=$2
RewriteRule ^article/(.+) index.php?action=article&id=$1
RewriteRule ^guestbook-(.+)\.phtml$ index.php?action=guestbook&p=$1
RewriteRule ^index_(.+)\.phtml$ index.php?action=index&lang=$1
RewriteRule ^calendar-([0-9]+)-([0-9]+)\.phtml$ index.php?action=calendar&year=$1&month=$2
RewriteRule ^(.+)\.phtml$ index.php?action=$1

And I have add some to template like follow:

<Directory {homedir}/httpdocs>
AllowOverride All
</Directory>

Is ehcp 0.37.3.b haven't startup mod_rewrite?How to fix it?

Restored from old drupal forum, for user uid:30183 username:akong
You may reset your password to access your new account here.
Reply
#2
check your apachetemplate file, for appropriate .htaccess apache configurations. consult apache docs for more info.

if you made some custom change to apache congfig of a domain,
use ehcp gui->choose domain->edit apache template

ehcp uses apachetemplate file in ehcp dir, by default,
if a domain's apache template is changed, then, that data is saved database and config in apachetemplate file is not used for that domain.

https://www.google.com/search?q=apache+htaccess+configuration

Restored from old drupal forum, for user uid:30183 username:akong
You may reset your password to access your new account here.
Reply
#3
I have check apache2template and search .htaccess.
I found follow setting.

AccessFileName .htaccess

But it's show 404 not found.I have add follow setting.
<Directory {homedir}/httpdocs>
AllowOverride All
</Directory>
But it's still show 404 not found.
I have save it and run sync domain.Could I lost any action?

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#4
* take care, when editing, as it may cause apache to malfunction, so, also keep in mind a fallback scenario,
* after editing, go to ehcp gui->options -> sync domains
* this way, your new apachetemplate file will be activated.

* what your apache error logs show ? the error logs may show some more information about the error caused.





Restored from old drupal forum, for user uid:30183 username:akong
You may reset your password to access your new account here.
Reply
#5
Not As simple as described here (ubuntu14 )
First try this

sudo a2enmod rewrite
sudo apache2ctl -M

to see that Mod_rewrite is working,

When you have verified the rewrite is not your problem move forward one step.

You have to hunt around etc/apache and www/new/ehcp/apachetemplate ,

apache2.conf and the sites enabled directory to get the correct "AllowOverride All" to work

note " sudo service apache2 restart " did not work for me,

only out of frustration I did a VPS reboot then all of a sudden It was Working !

Go Figure . . .?


Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping