Hi,
I'm trying to use rewrite rules in my .htaccess to take user from an old link to a temporary new link (it's not a permanent new site, so I don't want a 301 redirect)
The following works for all the html pages and also the php pages without parameters, but it doesn't process the last example - a php page with parameters. Note that t...
I have an .htaccess file with this: (I didn't write it)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?bla=$1 [L,QSA]
Problem URL http://localhost/index/test
The "index" part seems to match "index.php" that's in a web dir and Rewrite fails.
Question: What's wron...
rewriteengine on
rewriterule ^/a/b$ ^/c$
not working,but
rewriteengine on
rewritebase /
rewriterule ^a/b$ ^c$
works.
...
I'm wondering if it's possible to use mod rewrite along with the ErrorDocument deceleration to customize the error pages depending on what type of file is requested.
For example a non-existent html or php file is requested Apache will give nice custom HTML page.
But if a non-existent image, js, css, etc... file is requested then Apache...
For a client I need to temporarily route their traffic to my own subdomain. Their host (a shared host) needs to be reconfigured for the site to work, but the client wants their site online ASAP (what else is new ;-)
Considering the following:
It's a new site/new domain, so there is no legacy SEO traffic.
Preferably I'ld like the c...
hi i have login.php ,
for that i have created the url rewrite in the .htaccess inside the login folder ,
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^login$ login.php [NC] # Change feed URL
but nothing happened ,
what i do now ,
am using wamp..
...
Dear all,
I need some help about rewrite_mode,
this is my wordpress address:
http://localhost/my_v2010/restaurants?m=display_Add
base_url: http://localhost/my_v2010/
post_name:restaurant
query string:?m=display_Add
I would like to use rewrite mode, let user just type
http://localhost/my_v2010/restaurants/display_Add
any clue ho...
Hi,
I'm writing a website that allows people to asses a web page's readability (Flesch-Kincaid Reading Ease, thank kind of thing).
Ideally I'd like the user to be able merely to preceed the target URL with mine (like many mirror sites do), and hey presto they can see the results.
I'm guessing it's got to be done with mod_rewrite, but...
Hi there,
tried to find the problem for this but nothings really working.
Basically, I'm trying to use the following regular expression:
RewriteRule ^course/filter:([a-zA-Z0-9_-\,\=]+)$ php/manage_courses.php?display=list&filter=$1 [L]
however I get a 500 error and this in the error log (note the escaped chars):
[Wed Jan 27 16:29:3...
Hi,
I am planning for multiple sub-domain names based on city, something like city1.mydomain.com, city2.mydomain.com, ...
All sub-domains will point to same file structure on main domain. Then in my program I would like to capture the city name and display content based on city.
What is the best approach to identify the city (based on ...
I have a very simple rewrite rule. It basically takes everything and sends it to index.php.
That rule works, but as you can guess any request to an image, css file, or js file gets redirected also to the php page. So i tried adding conditions, but they dont work at all:
RewriteCond %{REQUEST_FILENAME} !(^.*css$)
RewriteCond %{REQUEST_F...
I want to redirect certain filenames to a different filename for a site regardless of directory.
The idea is I have a cached, versioned filename for production, but when I am working on the file in development I want my local files without having to rename all references. For example, styles-0.1.min.css would redirect to styles.css of t...
Hello,
I've installed cakePHP on a shared server where I can't set the Apache webroot, so it's currently pointing to /public_html. In that folder I have /cake, /app, /vendors, etc. Everything works fine; the only problem is that rather than links to controllers/actions being www.mysite.com/controller/action, there is an addition /app/ i...
Hello.
I am trying to lock a client out of a PHP application I created them but, still allow them a "virtual" access to the doc root using:
RewriteCond %{DOCUMENT_ROOT}/ftp/%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}/ftp/%{REQUEST_URI} -d
RewriteRule ^(.+) /ftp/$1 [L]
This works like a charm when a user goes to: http://domain...
I have this in my .htaccess file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !\.(gif|jpg|png|css|js|ico|flv|php|txt)$ index.php
Now i need to add another rule that will forward to index.html if no REQUEST_FILENAME is found.
So www.mysite.com would forward to index.html and www.mysite.com/file.html would forwar...
Hi there,
I've got a client who recently changed their name. They had an SSL certificate for their site, and I was using mod_rewrite to ensure all requests to domain1.com and www.domain1.com went to https://domain1.com.
Now that they are domain2.com, I'd like everything to go to https://domain2.com. Not so easy, it turns out. I have eve...
I have a permalink working but as soon as I create a post it tells me that soory post not found permalink setting is to "/%pagename%/" and here is .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ryan/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
R...
Hello, I was searching in Google this question very much time but I don't find any answer.
I want to rewrite http_//mydomain.com/f to http_//mydomain.com/
This is my .htaccess code:
Rewriterule ^f$ / [R=301,L]
rewrite works, but if exists a file called f.php, then doesn't work
I tried to do this:
RewriteCond %{REQUEST_FILENAME} !-...
Hi guys.
I forgot how to do that and I am stuck.
I have a site say www.example.com and another folder www.example.com/docs/
I want when some one visits the www.example.com/ he will be redirected secretly to www.example.com/docs/ but still see in the URL www.example.com
And even if the user types www.example.com/docs/ I want him to see w...
The title doesn't give justice to the question.
I have a site and I want it to be redirected to a subfolder.
I have this right now:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.net$
RewriteRule ^(.*)$ "http\:\/\/www\.mysite\.net\/subfolder$1" [R=301,L]
The problem is that it result...