Jump to content

[SOLVED] Same version of apache, two different behaviours?!?


EvanAgee

Recommended Posts

Okay, so both of the servers in question were runnig Apache/2.0.52 (CentOS). However, on one server my htaccess mod_rewrite syntax is working perfectly and on the other it's not working at all! Below is the syntax.

 

RewriteEngine on

RewriteRule ^print/$ /lib/cjprinterfriendlyv2/printpage.php

 

RewriteRule ^make_offer/(\d+) /?action=make_offer&p=$1 [L]

RewriteRule ^blog(/|)$ /?action=blog [L]

RewriteRule ^blog/(.+)$ /?p=$1 [L]

RewriteRule ^tags/(.+)$ /?tag=$1 [QSA,L]

RewriteRule ^asset/(.+)/(\d+)(|/)$ /?asset=$1&id=$2 [L]

RewriteRule ^video/(\d+)(|/)$ /?asset=video&id=$1 [L]

RewriteRule ^asset/video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1 [L]

RewriteRule ^video/(.+)(\.php|\.html|\.htm)$ /?asset=video&file_name=$1 [L]

RewriteRule ^tags/$ /?tag=INDEX [L]

RewriteRule ^presearch/$ /?action=presearch [QSA,L]

RewriteRule ^search/(.*)/(|pages|images|videos)$ /?action=search&s=$1&t=$2 [L]

RewriteRule ^sitemap/$ /?action=sitemap [L]

RewriteRule ^sitemap/(image|video)(&p=(\d+)|)$ /?action=sitemap&m=$1&p=$3 [L]

RewriteRule ^ecommerce-videos-movies/$ /?action=sitemap&m=video [L]

RewriteRule ^ecommerce-images-photos/$ /?action=sitemap&m=image [L]

RewriteRule ^email_this_page/(\d+)(|/)$ /?action=email_page&pid=$1 [L]

RewriteRule ^email_this_page/asset/(\d+)(|/)$ /?action=email_page&&is_asset=true&aid=$1 [L]

 

RewriteCond %{REQUEST_URI} !^/lib/

RewriteCond %{REQUEST_URI} !^/admin/

RewriteRule ^(.+)(\.php|\.html|\.htm|\/)$ /?p=$1$2 [QSA,L]

 

For the newer server that's not doing what I expect my URLS http://www.domain.com/dynamic_page_title/ aren't working correctly. On my older server it worked perfectly.

 

Any ideas?

Link to comment
Share on other sites

Originally I was getting a 500 error because my php file that controls all of the various URLs is index.php, so I was getting a too many redirects error.

 

I fixed that problem and now I'm just getting a 404 error. Again, this was working fine on my last server with the same host.

Link to comment
Share on other sites

Just add these lines to the top of your .htaccess file.

 

RewriteLog "/path/to/rewrite.log"
RewriteLogLevel 5

 

Apache will need perms to write to /path/to/rewrite.log, you'll also want to remove this once (if) it helps you as it adds allot of overhead to each request.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.