rewrite

htaccess rewrite is giving me 500 error?

i have this url that i wanted to make friendly, using rewrite on .htacess but it gives me an error(500 internal server error), this is my orginal php url http://www.example.com/viewtopic.php?topic=lovetopic i want to change it to this: http://www.example.com/lovetopic this is my whole htaccess code is this: RewriteEngine On Rewrit...

How can I remove index.php from the address while redirect requests to index.php via fastcgi?

I have a basic Magento (PHP app, using index.php as the controller) setup on an Ubuntu server. I configured NGINX to use PHP-CGI to serve all PHP pages. While the site is working as expected, all the URLs are of the form: http://domain.com/index.php/apparel/shoes.html Is there a way to use the nginx rewrite setting so that I can have the...

Apache rewrite rule

I am a rewrite newbie, I am wondering why this rewrite rule is not working, it ceases Apache from starting RewriteRule ^([-a-zA-Z0-9_]+)?/constant/([-a-zA-Z0-9_]+)/(.*)$ http://$2.domain.com/$1/$3 [R=301, NC] What this rule should do is URL refactoring, examples: http://www.domain.com/controller/constant/variable/action should be red...

What is wrong with this apache url htaccess rewrite rule?

I've got this: RewriteEngine On RewriteRule ^/redir?url=(.*)$ http://blah.$1 When I use this and go to the url that looks like: http://www.mydomain.com/redir?url=www.otherdomain.com It says the file isn't found on my server. I.E. no redirect. What I want it to do in the above example would be to redirect to: http://blah.www.othe...

Use a Taxonomy ID as permalink structure in Wordpress

Hi there! It is common to use %post_id% and %postname% in our permalink structure. My question is: Is there a way to use a structure based on the ID of Tags, Taxonomies and Categories?? Example: mysite.com/my-taxonomy/ -> mysite/2/ Thanks ...

Need help to add custom rewrite rules to wordpress rewrite rules

I want to combine RewriteEngine on RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteRule ^tags/(.).html$ videos.php?search=$1 RewriteRule ^videos/(.)-(.*).html$ watch-video.php?id=$2 RewriteRule ^video-tags.html$ video-tags.php RewriteRule ^most-watched-videos-([0-9]+).html$ most_watched.php?page=$1 RewriteRul...

wordpress custom post type rewrite rule pagination for author

i'm using Wordpress 3.0.1 and i have made custom post-type called 'dienasgramatas'. my plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink structure to query posts with this post type coming from defined author, but i can't create rule for pagination: the one that works: $new_ru...

Apache RewriteRule removing submit x y coordinates from Querystring (Mac Snow Leopard OS X)

This ought to be a simple exercise in Apache with mod_rewrite and all of it's flexibility. I have verified the Rewrite module is working with full logging but no matter how I shake out my rules and conditions, I can't get it to work. What I want is to rewrite the following url: http://www.domain.com/search?x=10&y=10&query=sear...

nginx rewrite question

Hi, I'm new to nginx and I got a rewrite problem here: I want to permanently redirect http://domain1.com/abc.php to http://domain2.com, but I want to keep http://domain1.com/abc.php?param=value, I've tried put rewrite ^/abc\.php$ http://domain2.com last; which works for http://domain1.com/abc.php, unfortunately it rewrites everythi...

Use domain as "prefix" on CakePHP

Let's say that I have a site running CakePHP and I have the prefix "product". I have lots of pages with URL like: http://mysite.com/produt/blue-shirt/details http://mysite.com/produt/blue-shirt/order http://mysite.com/produt/skate/details http://mysite.com/produt/sun-glasses/vendors Now I need to use a domain like http://mysite-blue-...

Rewrite rule - but only if to a certain url

Hello all, I have a rewrite rule in my htacces that rewrites POST http authorization requests and converts it in to a get request. But this happens to every http auth request. I actually only need it to rewrite if it is going to the www.mysite.com/googlecheckout/api url: This is what I currently have: RewriteCond %{HTTP:Authorization...

htaccess rewrite rule redirect

I have some old urls http://www.website.com/result/?q=&result=1 http://www.website.com/result/?q=&result=2 http://www.website.com/result/?q=&result=3 http://www.website.com/result/?q=&result=4 etc.. probably going up to about 60 Is there anyway I can create one rule that redirects any query that looks like this to the...

Rewrite Rule in Nginx

Hi. I conisder moving to Nginx but I want you to ask if is possible to rewrite urls into that schema, and if you could help me a bit: A url like http://example.com/username into profile.php?u=username. But then, will I have problems in accessing other pages like e.g. home.php A url like http://example.php/questions/102039/that-questi...

rewrite rules for wordpres 3.0.1 multi site with subdirectories nginx

Hi, I've been trying to use the solution from this post: http://stackoverflow.com/questions/3488861/rewrite-rules-for-subdirectories-in-wordpress-3-multiuser-with-nginx But I keep getting an "unknown directive if(" when restarting nginx. Am I doin' something wrong or do I have the wrong rewrite rules or what? Thanks for your help. La...

Allowing PHP $_POST with htaccess

Hi all. I'm not so good on htaccess but was happy with what I had done so far until I noticed my $_post variables were not being processed because of the rewrite signiture within my htaccess file (SIGH) My objective was to read the url and determine it's path and location from php and it's $_SERVER['request_uri'] method, which works fin...