The rewrite tag has no wiki summary.
3
votes
3answers
275 views
.htaccess URL rewrite
I used to have a rewrite rule to
RewriteRule ^([^/]+)\.htm$ index.php?c=$1 [NC]
RewriteRule ^([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC]
Now, I have to change to
RewriteRule ...
0
votes
0answers
436 views
htaccess rewrite rules converted to nginx not working?
I used this tool and converted my rules to Nginx. However one rule doesn't seem to be working.
My working .htaccess rules are:
RewriteRule ^(.*)\.html $1\.php
RewriteRule ^(.*)/settings\.html$ ...
2
votes
1answer
67 views
Rewrite catalog/index.php to www.domain.co.uk
We have an online shop with a welcome page. Our SEO company has asked us to get rid of the welcome page with a rewrite. I am struggling to get this to work. Can you help please?
I want to rewrite ...
1
vote
1answer
147 views
dynamically rewrite URLs upon the user's selection - is it possible?
In my PHP based web application, there's a form that generates a URL according to the user's selection.
The form has 7 different fields, each one of them affects the final URL, none of them is ...
3
votes
4answers
1k views
How to create .htaccess to block access to a subdirectory that hosts a separate domain
So I am pretty noob at with creating code in .htaccess, but I know it is what I need to accomplish a pretty simple task. So here is what I want to do.
I have a main domain, (me.com), and I am hosting ...
0
votes
2answers
467 views
.htaccess rules to rewrite URLs to front end page?
I am adding a new application to my site at example.com/app. I want views at that URL to always open myapp.php.
E.g.
example.com/app -> example.com/app/myapp.php and
example.com/app/ -> ...
0
votes
0answers
244 views
Rewrite rule using .htaccess for boonex dolphin script [closed]
I want ask what rewrite rule should i use in .htaccess for following URL:
http://mysite.com/m/videos/albums/my/add_objects/**CaptainZoap-s-videos**/owner/**CaptainZoap**
and i want to make the ...
4
votes
1answer
911 views
How can I use .htaccess to rewrite different domains to different sub-directories, masking the sub-directory?
I have a shared hosting plan that allows unlimited addon domains, but they can only point to the public root (/). I use .htaccess to point different domains to their corresponding sub-directories. For ...
4
votes
4answers
297 views
htaccess 301 redirect help needed(removing GET parameters)
Due to some issues in my site many pages are visible as duplicate using : www.example.com/page.html?task=view but it's content is exactly same as www.example.com/page.html.
One way is to use http 301 ...
0
votes
2answers
246 views
Which method is better to add www. before domain name
I have search through google and found 2 methods to add "www" before domain name. first is by adding a CNAME and second is using rewrite mod in .htaccess file.
I just want to know which method is ...
0
votes
1answer
48 views
IIS Rewright from “www” to “https”
If I use "mywebsite.com" IIS will do as expected and redirect it to "https://mywebsite.com".
If I use "http://mywebsite.com" IIS will do as expected and redirect it to "https://mywebsite.com".
...
1
vote
2answers
98 views
How do I redirect www and non but not IP
I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html
I am using the following code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ ...
1
vote
1answer
113 views
Apache URL Rewrite
I'm trying and failing to get a URL rewrite working, firstly I'm doing it in the vhost declaration, is that right?
What I'm trying to do is take any URL which has;
view.php?id=[a 1 or multidigit ...
2
votes
1answer
194 views
.htaccess rewrite , parked domain on another site to read the proper domain name
I have a parked domain ¨mysite.co.uk¨ on another domain name webspace in a folder and need to rewrite the mysite.co.uk domain name in the browser URL as it currently shows the Other domain name while ...
3
votes
2answers
1k views
Removing .html and index.html from URL
I'm having some problems trying to
Remove the .html extension from URLs
Removing 'index.html' from an URL
1) To remove the extension I have tried using this in my htaccess file.
RewriteEngine on
...
2
votes
2answers
290 views
Apache Rewrites not working due to Akamai
I have a website which is setup with akamai. My domain and subdomains are mapped onto an Akamai IP.
I have written an Apache rewrite which does an internal URL X to another internal URL Y. This ...
2
votes
1answer
181 views
Is there a SEO benefit of a 'reverse canonical redirect' back to the 'friendly' URL?
As far as I understand, you should have a single URL to access a given page on a website to prevent duplicate issues. With this in mind I have setup IIS7 Rewrite to point my friendly URLs to my .aspx ...
1
vote
2answers
1k views
apache domain redirect to subfolder
I have a hosting account with godaddy. Its a linux system running apache. The way they do their setup is your primary domain is the root folder. When you add a subdomain its in a subfolder of the ...
1
vote
3answers
803 views
apache rewrite .htaccess google adwords gclid
I've got an url coming in as:
/index.php?/location/&gclid=287ejek22kj
This is going to a 404 page because of the gclid...
I need it to go to:
/index.php?/location
I've tried this, with no ...
2
votes
2answers
69 views
Can you rewrite the root?
Not sure how to word this one but will explain most I can.
I am trying to make the following happen.
Re-write this http://domain.name
To this http://domain.name/home/
Is it possible ?
update
...
0
votes
1answer
85 views
I need a little help with .htaccess rewrite
I need a little help with .htaccess file I have songs, singers and albums links I want to rewrite.
I all ready rewrote the links and they are like this:
the links for the songs is like this:
...
1
vote
2answers
134 views
htaccess rewrite problem
Maybe is best way to show my problem in one example.
In my .htaccess :
RewriteRule ^catalog/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/ ...
0
votes
1answer
56 views
help with htaccess code for navigation [duplicate]
Possible Duplicate:
I need a little help with .htaccess rewrite
Hello,
I need a little help with .htaccess file. I have songs, singers and albums links I want to rewrite.
I already rewrote ...
2
votes
2answers
1k views
Use .htaccess to rewrite requests for a PNG as a PHP GET variable
I'm REALLY bad with .htaccess files, and reading through the existing questions on SO only confuse me more (mainly because they're all situation-specific and don't exactly apply to my situation at ...
0
votes
1answer
336 views
htaccess rewrite - Associating subfolders of web root as index of domain
I've been trying to find specific information on the problem, but it all seems rather confusing or irrelevant.
I have an Apache install with several subfolders with different websites. I need ...
3
votes
2answers
4k views
Rewrite for robots.txt and favicon.ico
I have setup some rules in which subdomains (my users) will default to where I have located the robots.txt, favicon.ico, and crossdomain.xml
therefore if a user creates a site say
...
0
votes
2answers
80 views
RewriteRules targeting a directory result in a gratuitous redirect
I have a standard CMS-like RewriteRule set up in my .htaccess:
RewriteRule ^(.+)$ index.php?slug=$1
Let's say I have a directory called "foo" in the root directory. For some reason, if you hit the ...
4
votes
1answer
4k views
Properly force SSL with .htaccess, no double authentication
I'm trying to force SSL with .htaccess on a shared host. This means there I only have access to .htaccess and not the vhosts config. I know you can put a rule in the VirtualHost config file to force ...
