Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite conditions

I looked up a cheat sheet for mod_rewrite conditions and what a surpise...

         

gambler132

3:17 pm on Jun 5, 2010 (gmt 0)

10+ Year Member



I looked up a cheat sheet for mod_rewrite conditions and what a surprise it don't work.

I am a complete nooboid when I comes to mod_rewrite, I have had so much trouble with it in the past and this is no exception.

The urls I am trying to rewrite are on:
http://hackers.xen.example.net/~jay/

The point of it is to rewrite /pages/* to /index.html?page=* and to some degree this works.
as you can see if you go /pages/* in the 404 it brings up index.html not found; meaning mod_rewrite is rewriting the url to index.html (which is good), however the fact that its a 404 is not. the index page is there as you can see by going to http://hackers.xen.example.net/~jay/ but when the url is rewrote it says otherwise.

A copy of the .htaccess file can be viewed at:
http://hackers.xen.example.net/~jay/htaccess

any help contribution would be greatly appreciated.

[edited by: jdMorgan at 7:28 pm (utc) on Jun 5, 2010]
[edit reason] Please use example.com, example.net only. [/edit]

g1smd

5:57 pm on Jun 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We need the code in this post. :)

gambler132

6:13 pm on Jun 5, 2010 (gmt 0)

10+ Year Member



What code?

g1smd

6:34 pm on Jun 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your
.htaccess
code snippet.

jdMorgan

7:33 pm on Jun 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Please review our Forum Charter. It will help you get the most from this forum, and also contains links to reaources which are more authoritative than "cheat sheets."

mod_rewrite does not lend itself to cheat sheets, canned solutions, or 'guessing' -- It is server configuration code, and one little typo or logic error can take down your server (if you are lucky), or it can sit quietly, slowly destroying your search engine rankings (and revenue) over time...

It appears that you're using mod_userdir on this server, which can interfere with (or change the requirements for) mod_rewrite code. It is often necessary to include the "userdir" (such as "~jay" in this case) in the rewriterule patterns and/or substitutions in order to get it to work.

Jim