I have my cakephp .htaccess files set up as in the cookbook and everything is working fine.
My web site currently has multiple domains, all of which point to the same site (e.g. www.site.com, www.site.co.uk). I'd like to set up a rule so that requests to www.site.co.uk/page are permanently redirected to www.site.com/page, etc.
I'm havi...
Hey all-
I have looked this up on here and Google but none of the suggestions seem to be working for me. I'm working on an internal site at this point so the endpoints are IPs vs URLs. Accessing the site via HTTPS works, but HTTP just says "Cannot establish a connection". I can't seem to find anything in the logs that explains why. I...
I want to be able to add/update/delete rewrite rules from the web.config.
Is this possible and are there any gotchas?
...
Hi, wonder if you can help me,
I've got a hosting account (on GoDaddy for my sins) which has one domain name associated with it and a few more parked.
If I visit:
site1.com
site2.com
site3.com
I get the contents of /httpdocs/
I want to redirect to a sub directory (locally) only so that if you goto site2.com, the URL stays as site2....
I've got two hostnames (e.g. www.site1.com and www.site2.com) mapped to the same apache virtual host. I'd like to redirect all traffic from site1.com over to site2.com, except for all POST requests from a particular folder. (That folder contains URLs which are used by older clients which are not capable of handling redirects on POST req...
In my htaccess I have a rule -
I have this rule
RewriteRule ^mk$ http://mysite.com/mypage.php [r=301,nc]
and later on :
RewriteCond %{HTTP_HOST} !^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [QSA,L,R=301]
This works fine for
http://mysite.com/mk
- it redirects to:
http://mysite.com/mypage.php
as I wanted.
...bu...
I have a shared hosting plan with HostGator and multiple CI installations. For each installation, I've been able to successfully remove the "index.php" from the URL, but on my addon domain, none of my CSS, or JS, or image files load correctly.
Here is what I have for mod rewrite on the main domain:
RewriteEngine on
RewriteCond $1 !^(i...
I have this in my htaccess:
Options +FollowSymLinks
Options -Indexes
RewriteEngine On
RewriteRule ^annons/([a-zA-Z0-9_]+)$ ad.php?ad_id=$1 [NC]
ErrorDocument 404 /404.html
This all works, except for one problem.
When I write an adress that doesn't exist like this:
http://www.domain.com/some_adress_that_doesnt_exist
then the 404...
Hi,
Im am working on a drupal website with acqui solar search. I have to use this url /search/apachesolr_search/, but I want to change it to 'search' instead.
If u create an alias, my search doesn't work anymore...
Can someone help met to write a function for the 'Mod rewrite' module or give another option?
Thanks in advance
...
In the robots.txt file, I am about to disallow some sections of my site.
For instance, I don't want my "terms and conditions" to be indexed by search engines.
User-agent: *
Disallow: /terms
The real path to the file is actually
/data/terms_and_conditions.html
But I have used .htaccess to rewrite the URL.
Now to my Q, should I ...
I am working on overhauling the URL structure of review pages, which can be filtered by city, county, # of stars and technician. I want to make the pages look like they are static HTML pages as well as replace pluses with hyphens.
My goal:
-Apply the new style URL's without modifying the reviews page, just the htaccess file
-Set up 301 r...
I need to provide a static url to a client, eg. http://domain.com/video.mp4. However this URL needs to provide a random video from a selection of 5 videos each time it is accessed.
Is this possible using PHP and mod_rewrite? Or some other way?
Thanks
...
Hello
I am having some troubles with my script..
when I access http://www.domain.com/this-is-a-topic I want it to redirect to http://www.domain.com/index.php?t=this-is-a-topic... BUT when it says "administration", "sitemap" or some other things, I want it to look either another rewrite condition or simply just get http://www.domain.com...
I'm trying to redirect an old wordpress blog to a new posterous blog using an htaccess file and I am using the code below; the problem is that I can't get the old individual blog posts to redirect to the new ones - they have the same name structure on the new domain name (eg: olddomain.com/post-1 is now newdomain.com/post-1), but if I ty...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^browse/videos/(.*)/(.*)/(.*)/(.*) /videos.php?sortby=$1&filter=$2&page=$3&title=$4
RewriteRule ^videos/(.*)/(.*) /playvideo.php?videoid=$1&title=$2
</IfModule>
url www.example.com/browse/videos/z/0/1/LastAdded goes to videos.php
but url www.exaple.com/videos/10/play.html also go...
hello i am trying to make it so that when you visit my site you don't have to put .php at the end this is what i am using but it isn't working (godaddy hosting)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
i just added the "Options +Follo...
How can I allow visitors to use this link (www.example.com/news?id=34) in order to see (www.example.com/index.php?page=news&id=34)
Right now I am hiding the extensions of my PHP files in order to make the links look nice. When visitors go to (www.example.com/news) they can see the page (www.example.com/index.php?page=news). However, whe...
I have a wordpress website on my main domain
For the wordpress website i have this in my .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>
# END WordPress
I just created an addon domain ...
What would be simplest way to get this functionality in my website. A small example code will be appreciated.
...
How can I use mod_rewrite to take http://www.site.com/events?pg=4 and turn it to a clean URL, like so: http://www.site.com/events/4 ?
Thanks for the help!
...