homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

help with mod rewrite

 12:20 am on Jul 4, 2013 (gmt 0)


having real problems as my host just updated to most recent version of apache and my friendly urls stopped working

this is the URL that comes in from the search engines

and this is the format the server needs it

I don't really know why this hass happened, and my hosting company is hopeless as to how to resolve it

what would the mod_rewrite code be to get this working again?

[edited by: bill at 1:12 am (utc) on Jul 4, 2013]
[edit reason] use example.com [/edit]



 12:53 am on Jul 4, 2013 (gmt 0)

Heh. There was a similar post quite recently and it also turned out to be a host-upgrade problem. Big name, so it may even be the same host. I'm envious. My host is HUGE and they don't seem to have upgraded yet.

Crystal ball says you've got a CMS that came with a prefabricated htaccess. It takes requests in one form and rewrites them to another form. Ordinarily the Apache version should have no effect, but there are some nasty exceptions involving exact format of paths. Or, then again, your host may have seized this opportunity to do some housekeeping, and physically rearranged everything on the server at the same time.

Before tearing out any more hair, check with the CMS itself and see if they've got an alternative htaccess for-- I assume-- Apache 2.4 instead of 2.2. And then you can post back and we'll tear the new version to pieces ;)

Just seen it prefers Example.com

Yes, often it's enough to follow the spirit of the law, but sometimes you have to follow the letter as well. A moderator will come along to fix it.


 1:26 am on Jul 4, 2013 (gmt 0)

welcome to WebmasterWorld, Robin_Javea!

stopped working

that's not much of a problem description to go on.

what response (status codes and Location: headers) do you get vs what you requested and what you were expecting?

what version of apache?

what does your current set of mod_rewrite rules look like?
(properly exemplified, of course)


 1:37 am on Jul 4, 2013 (gmt 0)

Thanks lucy and phranque

I think we might be talking about the same host lucy, as all this has just happened following an upgrade from 2.2 to 2.4... for several years all was running okay with the friendly urls... the htccess up to that point didn't need to contain anything other than the php versions, so there was no mod_rewrites or additional coding needed.


 3:39 am on Jul 4, 2013 (gmt 0)

Does any of this sound familiar?



 9:03 am on Jul 4, 2013 (gmt 0)


Your "friendly" URLs aren't all that, uhh, friendly. You don't need "product.php" in the URL and the "fake" folder levels could be an issue.


That's a more friendly URL!

this is the format the server needs it

You do realise that the product name part of the friendly URL request isn't being passed on? If the CMS is not checking that the requested product name is valid for this particular product number you have an infinite duplicate content problem. You also leave your site open to malicious
http://www.example.com/product.php/23/this-is-junk linking.
Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved