|
#1
|
|||
|
|||
|
I am migrating a Wordpress blog from Dreamhost where it used rewrite rules for permalinks. I copied .htaccess file to /public_html/.htaccess but it doesn't seem to have any effect - the error log shows the original paths like
File does not exist: /home/username/public_html/wp/contact/ The beginning of .htaccess file is below. Do you I need to enable something before the rewrite takes effect? # BEGIN WordPress RewriteEngine On RewriteBase /wp/ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [S=95] RewriteRule ^(contact)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L] RewriteRule ^(contact)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L] RewriteRule ^(contact)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L] RewriteRule ^(contact)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L] RewriteRule ^(contact)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L] |
|
#2
|
||||
|
||||
|
Check to see if you are running PHPSuExec. If so, try moving the mod_rewrite .htaccess above /public_html/.
|
|
#3
|
|||
|
|||
|
Serra,
I've looked around the cpanel and docs but I can't see how I can check if I am running PHPSuExec (some official post from 2005 said that all hostgator hosts were switching to PHPSuExec). Also, could you elaborate why PHPSuExec should have any effect on the Apache rewrite rules? Lastly, if I move .htaccess above /public_html/, wouldn't it conflict with Wordpress trying to maintain the rewrite rules in the web root? Thanks in advance. |
|
#4
|
||||
|
||||
|
Check PHPinfo. If server API is CGI you are running PHPSuExec.
What? I'm not sure of the question, but rewrite rules above the root will effect web root. I've had trouble getting rules to work if they were in the root, when I moved them above root they worked fine. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|