Forum Moderators: phranque

Message Too Old, No Replies

Rewrite Help

Help with Mod_Rewrite wordpress problem

         

Brad080283

2:40 am on Sep 6, 2006 (gmt 0)

10+ Year Member



First off.. I'm new here so hello everyone! Nice forums..

Now, I'm also new to Mod_Rewrite and I've been trying to read up on it and write my own code but I keep getting 404 errors. I'm using wordpress so this is what I have so far that is automatically generated by wordpress.


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>

I want to add this:
For - [domain.com...]
This is what I have:

RewriteRule ^gallerys/([A-Za-z0-9]+)/$ /gallerys/?file=$1 [L]

And for - [domain.com...]
I have:

RewriteRule ^gallerys/([A-Za-z0-9]+)/([A-Za-z0-9]+)/$ /gallerys/?file=$1/$2 [L]

Neither of them work correctly. Are the rules that are already in the .htaccess conflicting with the new stuff I'm trying to write? Or I'm just totally going in the wrong direction? :? Thanks for your time guys.

jdMorgan

8:45 pm on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How do "neither of them work correctly"?

How did you test? What URL did you type?

What were the results, and how did they differ from your expectations?

What do you see in your server error log and your access log?

Where is this code located?

Jim