0
votes
1answer
28 views

Mod Rewrite to a non existend direcotry

my problem is, that if I rewrite my URL with following rule RewriteCond %{QUERY_STRING} ^site=meine-bar&filter=([a-zA-Z]+)$ RewriteRule ^meine-bar/([a-zA-Z]+)$ ...
0
votes
1answer
16 views

change static url to dynamic with mod_rewrite

I need to change something like this: www.mydomain.com/www.otherdomain.com to this: www.mydomain.com/index.php?co=www.otherdomain.com Using mod_rewrite I came up with this: RewriteRule ^(.*.)+$ ...
0
votes
1answer
19 views

Some hostings don't like character class in .htaccess regex?

I have this problem very rarely and only on some hostings. Here is my .htaccess for my custom framework: Options -Indexes ErrorDocument 403 /application/views/403.htm ErrorDocument 404 ...
0
votes
1answer
17 views

Paypal with Htaccess Mod_Rewrite

I've got a problem with Paypal and Htaccess, I can't figure it out how can I integrate the Paypal query string with my mod_rewrite directive. I have already tried to use the suggestion of this answer ...
0
votes
2answers
18 views

URL Rewriting in .htaccess - getting confused with params

I searched in the web to find a valid solution for my problem, but nothing works. Hopefully you guys can help me. I want to Rewrite a URL on an Apache doing like that: (1.) ...
0
votes
0answers
38 views

mod_rewrite redirect to a sub dictionary dependent of php parameter

I want to redirect from a link like index.php?site=recipes&id=2451 to recipes/2451 and in fact in works pretty good beside one thing. First my whole htaccess RewriteEngine on RewriteBase / ...
-1
votes
0answers
23 views

htaccess rewrite rule based on Cookie [closed]

I want to redirect the request to a different site by checking whether the cookie "MY_cookie" is set or not. If its set, redirection should happen. This is the code that i am currently using, But it ...
1
vote
1answer
39 views

Redirect all www to non-www including subdomains

I have two separate WordPress sites on the same domain, one installed in the following way: http://subdomain1.domain.tld and http://subdomain2.domain.tld. http://domain.tld redirects to subdomain1. ...
0
votes
2answers
30 views

RegEx | Match string not starting with a specific word

I am writing some mod_rewrite regex, and I have several request URLs that lookg like that use1mycompany use2mycompany use3mycompany use4mycompany but also I have and some request URIs that start ...
1
vote
0answers
27 views

RegEx to rewrite folder structure of varying length and file name to string

This is the code I'm using, developed with the help of @anubhava to rewrite a path generated by a CGI script to redirect the path from the location of my jpg image files to another folder that ...
0
votes
1answer
19 views

mod_rewrite rule won't work when matching GET parameters

I have this RewriteRule: RewriteRule ^wiki/search[.php]*?q=(.*)$ /wiki/search/$1 [R] in an attempt to rewrite the format /wiki/search?q=search_query to /wiki/search/search_query which is then ...
1
vote
2answers
38 views

RegEx captures file extension when I only want the base name

I'm using the following RegEx in a Mod-Rewrite command, but don't want the $1 variable to capture include the .html extension. RewriteRule ^photo-search\/([^/]+)(/|\.html|)$ ...
0
votes
1answer
28 views

htaccess | RewriteRule

I am migrating a web site from a Windows Server into a Apache and I like to redict some 404 URLs to correct/equivalent URL in my new server. What I like to do is to make the following sorten by using ...
0
votes
0answers
20 views

Rewriting URL with a parameter using mod_rewrite

I'd like to rewrite such a URL http://site.com/a-b-c-..-f that can also have a parameter appended e.g. http://site.com/a-b-c-d?par=123 to http://site.com/blog.php?page=d&par=123. Without the ...
1
vote
2answers
15 views

mod_rewrite rule to change parent folder

Some unchangeable hyperlinks on a website point to /folderA/index.php?id=somestuff. I need to redirect the Request to /folderB/index.php?id=somestuff instead. I did some experimenting with this but I ...
0
votes
1answer
30 views

mod_rewrite regexp with parameters

Trying to create a php file that dynamically resizes an image for web on demand. I have the php working, now i want "pretty" URLs for it, currently i have this RewriteRule ...
0
votes
0answers
14 views

Apache mod rewrite for A/B testing

Hi I need to do A/B testing but my URLS are failing I have my htaccess setup so it rewrites my URL'S like so, Before rewrite www.mysite.com/index.php?article=lorem-ipsum After rewrtie ...
1
vote
1answer
36 views

Need help creating reg-ex expression to rewrite path and filename using information in original path and file name

I wish to redirect the link to my images in my image database to a cached copy of the watermarked images. My scripting program that runs my site reconstructs the watermarked file name using the ...
0
votes
0answers
15 views

apache mod_rewrite forward path not matching prefix

Running Apache 2.2.15, I tried to forward any requests NOT matching the prefix api/ using the look-behind regular expression (rather than serving by the Phusion Passenger rails plugin.) (I think ...
0
votes
0answers
18 views

htaccess Query rewrite rule does not work - others work

I have Rewrite Engine working as these rules are working Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^index.html index.php Rewriterule ^home.html home.php RewriteRule ...
1
vote
2answers
32 views

.htaccess with 2 parameters messing up css, js, images paths

I was working with URLs on my webpage but I can't solve issue for URLs with 2 parameters. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ...
1
vote
1answer
11 views

Mod rewrite rules for passing parameters

htaccess file to redirect as follows: pagename.com/foo -> pagename.com/index.php?view=foo and it works code in htaccess is RewriteRule ^foo$ index.php?view=foo [L] but I would like to use ...
0
votes
1answer
31 views

Creating static, SEO friendly URLs with mod-rewrite

Okay I have revised a previous question to make my intentions more clear and hopefully to help others wishing to do similar things. Let's say I have a digital download store, I want my URL's to look ...
0
votes
2answers
49 views

Configure .htaccess to change HTTP GET parameters to URI

I'd like to ask a simple question about .htaccess. I have a form from index.html, and would like to pass a value to receiver.php. How do you configure .htaccess to output ...
0
votes
1answer
22 views

Rewriting strange urls back to website root

Google has indexed some strange urls and now i'm getting some hits to them. I wanna get rid off those hits and rewrite them to the frontpage, but seems that I'm lacking some skills to do that. In ...
1
vote
0answers
37 views

mod_rewrite vs files vs virtual subdirectories

I have a site with virtual subdirectories (for languages) created by the means of mod_rewrite. They work fine. Now I need to upload some files that should be accessed via certain subdirectories only. ...
0
votes
0answers
40 views

Apache ProxyPass exclude domain from virtual host

I am performing some reverse proxies on my apache server, but I'm running into some problems. I have a it proxying pages from another server which works fine with the following example: ProxyPass ...
3
votes
2answers
35 views

Apache mod rewrite for dynamic pages

I'm having a problem with my mod rewrite rule that I wrote for my website, nothing seems to change as my pages URL are loading the same as before, if anyone could have a look at it and let me know if ...
0
votes
2answers
30 views

Htaccess Not Working - Redirect 301

Due to some bad URLs, we generated some links that don't work and I want to redirect them with a 301 redirect to clear up some webmaster tools issues with Google. So, we have this URL like this: ...
0
votes
1answer
47 views

RegEx and Mod_rewrite to convert dynamic to static URLs and static to dynamic URLs

I have two intertwined problems to solve. My stock photography website is driven by a PERL-scripted program called ImageFolio, purchased in 2005. The program allows for display of photos by ...
0
votes
2answers
15 views

Using or ( | ) statement in .htaccess rewrite rules

Instead of writing 2 rewrite rules for pointing to the same page, I though I would be able to do this with one rule using the Or statement ( | ): RewriteRule ^([\d]+)-post[\d]*\.html|#post([\d]+) ...
1
vote
2answers
48 views

Removing Part of URL with .htaccess

I have recently removed a module from Magento that created vanity URL, for filtered searches. When I've removed this module its now using URL parameters for all filtered navigation pages. I want to ...
0
votes
1answer
59 views

How to rewrite url while keeping additional parameters in .htaccess file?

I have the standard htaccess which just catches all and puts it into one url parameter which is later processed in code... RewriteRule ^config/ - [F] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
33 views

mod-rewrite condition is not working properly in IIS6

Additional questions for mod-rewrite module coded by Helicon for IIS6. First condition for redirecting IP addresses works as expected. However, I have also added a second rewrite condition that does ...
1
vote
1answer
52 views

.htaccess condition will omit ranges of ip addresses, but that i can modify as i see valid addresses in logs

I have the following in my .htaccess file: RewriteCond %{REMOTE_ADDR} (\b88\.78\.30\.\d{1,3}|\b182\.\d{1,3}\.\d{1,3}\.\d{1,3}|etc..) RewriteRule (.*) http://www\.foobar\.com/botcatch.html [I,RP] ...
0
votes
1answer
50 views

Apache mod_rewrite rule for complex sitemap + index xml files

We manage sitemap (sitemap.org) files that have in the range of 500k links, which are changing often enough that we want to dynamically generate them, don't worry, we'll cache the results for a period ...
1
vote
1answer
62 views

.htaccess, check if RewriteRule Regex exists as a file or dir

In order to check if a file eixists (does not exist), I'll write something like that RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^((en|es|de)/)?([a-z0-9\+_-]+)/?$ something.php?hl=$2&seoq=$3 ...
0
votes
3answers
46 views

How make this htaccess redirect correctly

I want to redirect this urls using htaccess RewriteRule: news/tags/video to news.php?t=video news/tags/interview to news.php?t=interview news/tags/news to news.php?t=news the urls: ...
0
votes
1answer
21 views

Regex is deleting the last character

In implementing clean URLs I wanted to map http://www.pikspeak.com/iframe/3/bird?autoplay=true to http://www.pikspeak.com/iframe.php?id=3&img=bird&autoplay=true using the following regex ...
0
votes
2answers
48 views

Change IP addresses to regex

Is there a way to use regular expression search and replace function in notepad++ to change ip addresses to a range for below? With below RewriteCond %{REMOTE_HOST} ^14.96.0.0/14 RewriteCond ...
1
vote
0answers
35 views

How to add .htaccess {REQUEST_URI} at the end of this Rewrite Rule? [duplicate]

Im making a site where users can create subdomains with files, folders etc. these sites go into a folder called websites so it will be site.com/websites/subdomain.site.com I only need to get ...
0
votes
2answers
35 views

RewriteRule not working as expected with mod_rewrite

I'm making a website, just running from localhost with xampp at the moment. I'm using mod-rewrite to redirect everything to my index, which works so far. # From /somepage # To ?site=somepage ...
0
votes
0answers
58 views

Lighttpd pass get parameters with mod_rewrite

I got a problem with mod_rewrite. Environment: PHP version: 5.2.6 Lighttpd version: 1.4.24 There's a PHP script which takes parameters like this: Get information (GET) NOTE: The number of ...
1
vote
1answer
39 views

Redirecting specific parameters to subfolders

I've been searching around a bit, but unfortunately I'm still at a loss when it comes to this problem, and being far from a veteran with .htaccess, I've been unable to work out a solution to my ...
2
votes
1answer
37 views

How do I mod_rewrite this URL?

I have a URL www.domain.com/catalog.php?category_title=widgets I want to mod_rewrite it to www.domain.com/widgets/ I've tried RewriteEngine On RewriteRule /([^/.]+)/[?]*[^\/\.]*$ ...
0
votes
1answer
36 views

.htaccess mod rewrite for 10 letter alpha numeric “word”

I am trying to redirect people who add an Amazon ASIN (10 letters/numbers) to the end of my domain... mydomain.com I want them to format their url's like so: mydomain.com/B008XCFLTM Someone gave ...
0
votes
2answers
47 views

.htaccess Rewrite “external” subdomain to subfolder if match

Lets say i have wildcard subdomains on an external domain, can be anything like demo.site1.com blah.site1.com and have directories like these on an external websites ...
0
votes
0answers
24 views

The following modrewrite is generating a server error and I can't work out why

The following .htacess file is throwing up a server error on every url, and is also breaking the images / css references. This modrewrite has been taken from Neil Crosby's answer mod_rewrite to ...
0
votes
1answer
58 views

htaccess regex Keep spiderbots outside

I can't get this part of the htaccess working : RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ...
0
votes
1answer
25 views

Forbidding external domain access

Question: I would like to allow only my website's form; <form action="link" to navigate to www.domain.com/link when my form is submitted. But to deny direct access to the URL www.domain.com/link. ...

1 2 3 4 5 15
15 30 50 per page