Tagged Questions
0
votes
0answers
5 views
SEO on multilanguage website URL
I'm setting up a multilanguage website and I would like to have your help to take the best decision as regard SEO. After reading this.
I would like to change my URLs from this form ...
1
vote
1answer
26 views
Google Analytics shows visits to pages redirected in .htaccess
Yesterday, I switched on a section of pages in our site that replaces a really old collection of pages. In our .htaccess file, I have rules that redirect a request for any page in the old section to ...
1
vote
2answers
63 views
How do I redirect a URL using rewrite in .htaccess that has a question mark and forward slash where page.html is the variable?
Hello and thanks to all who contribute to this seemingly mind boggling puzzle. I apologize in advance if .htaccess questions belong on server fault.
So I have to move a domain to our hosting servers, ...
3
votes
1answer
28 views
URL not found after rewrite
Using this .htaccess file:
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule matches/(.*)-v-(.*) matches/matchevent.php?event=$1%20v%20$2 [R=301,L]
This url: ...
1
vote
1answer
26 views
Silent redirection not working with mod_rewrite
I'm trying to grasp apache mod_rewrite
When I add this to my .htaccess it silently (url doesnt change) shows page bob.htm
RewriteEngine on
RewriteRule index.htm bob.htm
I.e. If I type this in the ...
2
votes
1answer
43 views
Simple RewriteRule [duplicate]
I'm trying to write a RewriteRule to make a simple url. I want users to be able to type enter
www.example.com/somepage
and have it take them to
www.example.com/abc/somepage.php
How can this be ...
1
vote
0answers
39 views
optimize htaccess
I have two condition which are conflict
RewriteRule ^patients/findadoctor/(.*)\.html$ subcategorydoctor.php?id=$1 [L,NC] and
RewriteRule ^patients/findadoctor/(.*)\.html$ ...
2
votes
1answer
51 views
.htaccess redirect with mod_rewrite
I moved my wiki from
http://jklatex.square7.de/wiki/doku.php/start
to
http://logicpuzzle.square7.de/start
and now i want to redirect the URL with mod_rewrite. My .htaccess is as follows:
# BEGIN ...
0
votes
2answers
41 views
Issue with Apache redirection [duplicate]
I want to redirect mysite.com or http://mysite.com or www.mysite.com or any other format given my user to http://www.mysite.com, I'm able to achieve this by rewriting following lines in my .htaccess ...
0
votes
0answers
34 views
URL rewrite with mod_rewrite
I have rewrite rule in parent directory which rewrites URL:
From example.com/index.php?id=test&cat=category
To example.com/index?test&cat=category
Here is my .htaccess file:
Options ...
0
votes
1answer
38 views
Capitals in URL subdirectory not changed by htaccess
Within my WordPress website I am redirecting sub directories to internal and external links. Now, when you place a CAPITAL letter in the sub dir it does not work anymore and the website does not show ...
2
votes
2answers
28 views
Need to remove www for only one sub directory from a domain
I have a domain like www.example.com. I need to remove www. from specified sub folder by using a .htaccess file.
Example :
www.example.com/blog should redirect to example.com
All other sub ...
3
votes
3answers
105 views
SEO Joomla URL to WordPress URL's
I am trying to migrate from Joomla 1.5 SEF URL's to WordPress SEF URL's.
The old links use this formatting: /site/sectionname/categoryname/id-titlename.html
I want to migrate it to ...
1
vote
1answer
67 views
Don't $_GET value on link rewrite with .htaccess
I config enable htaccess on my server (i enable mod_rewrite and do like this: http://stackoverflow.com/questions/11064005/enable-htacess-error-on-ubuntu-12-04-with-apache2)
But on localhost is run ...
1
vote
1answer
29 views
Trouble reading htaccess canonicalization
I just took over development of a site and am having trouble figuring out the canonicalization rewrite rules (not my forte). I've pasted the code below.
The first bit seems straight-forward enough, ...
0
votes
0answers
116 views
How to allow a Subdirectory to work and stop redirecting?
I run Drupal on a webserver in the root www directory.
I have added another application in a www subdirectory (Piwik). When I try to navigate to the subdirectory app, I get this error message "The ...
1
vote
2answers
264 views
“File does not exist” in apache error log when mod_rewrite is using
I am getting below error in server log, when re-writing the urls.
[Fri Jan 25 11:32:57 2013] [error] [client ***IP***] File does not exist: ...
1
vote
1answer
74 views
Redirect www to non-www only for https://
I can't seem to find a nice way to redirect https://www.x.co.uk to https://x.co.uk whilst letting http://x.co.uk and http://www.x.co.uk keep whatever they want.
Could anyone lend a hand?
I have ...
1
vote
2answers
132 views
How to setup up .htaccess rewrites for http and https on the same site?
Im having some issues with htaccess rewrites i need to redirect different parts of my site to https rather than http, for example login and news sections. Im not sure how to go about doing this in the ...
0
votes
0answers
143 views
htaccess RewriteBase on subfolder
I have a WordPress blog on my domain, with a classic .htaccess permalink rule (redirecting from domain.tld to www.domain.tld.
Now I also have an IP.Board forum, installed in the /forum/ subfolder. ...
2
votes
1answer
107 views
how to fix .htaccess - redirect http://408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111
We want to use mod_rewrite and .htaccess to do a redirect. How do we redirect http://408.111.1111.domain.us/ and www.408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111 ? If the ...
2
votes
2answers
175 views
HTACCESS Wildcard Subdomain forward to Domain
I know this may seem like a duplicate, but I am unable to find a solution.
Is it possible to setup wildcard subdomains with htaccess?
I have an example of
http://test.domain.ca I need to forward ...
2
votes
3answers
483 views
mod_rewrite works within directory not on root
I am having a problem with my RewriteRule for the querystring portion. What I am able to debug is that the rule is being triggered at least because the page "tags.php" is being rendered but without ...
1
vote
2answers
168 views
WordPress .htaccess preventing subfolder access
This is sort of a goofy setup, but it's not in my power to reconfigure it at this time. I'm running in a shared hosting environment.
The domain is example.com. This is an add-on domain on the host ...
1
vote
1answer
1k views
Enable 'mod_rewrite' Using .htaccess File On cPanel Shared Hosting Server
I'm using cPanel to host my website. I need to enable 'mod_rewrite' on this Shared Hosting cPanel account to run my script. I've tried to Google the solutions high and low but did not find any luck ...
1
vote
1answer
134 views
Removing 301 redirect from site root
I'm having a look at a friends website (a fairly old PHP based one) which they've been advised needs re-structuring. The key points being:
URLs should be lower case and more "friendly".
The root ...
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 ...
3
votes
1answer
162 views
How can I redirect all files in a directory that doesn't conform to a certain filename structure?
I have a website where a previous developer had updated several webpages. The issue is that the developer had made each new webpage with new filenames, and deleted the old filenames. I've worked with ...
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 ^/?$ ...
2
votes
1answer
300 views
Need a generic way to create SEO friendly URL
I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly?
Currently this is in my ...
5
votes
2answers
430 views
.htaccess two different rules but only one per time
I'm rather new to the whole .htaccess thing and I'm using the following right now to use 'pretty url's':
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
...
3
votes
1answer
375 views
Wild card redirect in htaccess giving error this webpage has a redirect loop
In my website I changed the directory name "vehicles-cars" to "vehicles-cars-for-sale". When I tried to redirect using a wild card redirect from my old directory name to new directory name in my web ...
3
votes
1answer
328 views
Disallow all user agents except one using .htaccess?
I've been struggling to get this .htaccess working. The aim is to disallow all user agents besides my app. The app sends a GET request with a user agent of lets say 'AcmeUpdater'.
Whenever I try to ...
0
votes
1answer
59 views
rewrite url for articles with htaccess
I've had a look through several other questions to see if i could get this working but have had no success at all at the moment so i'm hoping someone can help.
This is the url i currently have,
...
0
votes
1answer
130 views
How to silently auto-load from a subdirectory, but allow internal paths to think the file is located at site root?
I have files in my site root, and also files in its "Iternet_IE" directory. I need to:
1.) be able to call/include other files (e.g. headers or footers) from within files at either of those ...
0
votes
1answer
135 views
htaccess Rewrite Syntax?
I have a bunch of files with a "NEW-" prefix (e.g. "NEW-index.php"). I need to do a 301 redirect to the corresponding file without the prefix. I've tried a few things but I'm not getting the regex ...
0
votes
1answer
661 views
Link to pages on site without .html extension appearing in browser?
I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example:
www.mysite.com/document
directs to
www.mysite.com/document.html
...
2
votes
2answers
277 views
Help with URL Rewrite
I have a page that selects some info from a database
and displays it with a link to a second page that uses
the result to query the database, something like this:
$sel=mysql_query("select id, title ...
2
votes
2answers
286 views
getting 500 intenal error when setting 301 redirect using .htaccess
I am trying to use a 301 redirect to direct users and bots to my new site but when I put the .htaccess live i keep getting a 500 internal error shown.
The site is actually a subdomain which i want ...
0
votes
2answers
265 views
help redirecting IP address
Google has indexed the IP address of my site rather than the domain, so now I'm trying to set up a 301 redirect that will redirect the IP address and all subsequent pages to the domain.
I currently ...
0
votes
2answers
351 views
When using Mod_rewrite does google bot see the original url or the rewritten url?
If i use the bellow code in my .htacess file would google bot (or any other search spiders) see the example.tumblr.com url or would they see the same url as the user ie. example.co.uk/blog ?
...
1
vote
1answer
180 views
mod_rewrite for directories
One of our developers who built the framework that our website uses is no longer with us and I appear to have a stack of issues across the site currently, one being URL rewriting across the site.
...
2
votes
1answer
295 views
Htaccess - Rewrite png to php file
I currently use trans.png.php?id=1&campaign=test to track my newsletter campaigns.
I want to use trans.png instead as it's the src of an img tag.
How can i do this in htaccess? Also is there any ...
4
votes
1answer
2k views
How to write a generic .htaccess file rule, regarding RewriteBase
The following rule in my .htaccess works just fine for routing calls to index.php:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
However, this does not ...
1
vote
1answer
1k views
.htaccess - lose the file .html extension
I'm having a bad .htaccess day!
I want a user to be able to type the URL
mysite.com/about
instead of
mysite.com/about.html
On .htaccess file I have:
RewriteEngine On
RewriteCond ...
3
votes
1answer
373 views
RewriteRule working local but not on remote server
I have a .htaccess file with one simple RewriteRule:
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ ?site=$1
I want to have an url like http://www.example.com/imprint and forward it to ...
1
vote
2answers
389 views
Having mod_rewrite not rewrite requests for a particular directory
I have many forward rules written in my .htaccess file. However, for the requests to a certain directory and its subdirectory, say wordpress, I don't want to use the forward rules.
RewriteEngine On
...
3
votes
1answer
461 views
Rewrite img and link paths with htaccess and serve the file from rewritten path?
I have a static mockup page, which I want to "customize" by switching a variable used in image-src and link-href attributes.
Paths will look like this:
<img src="/some/where/VARIABLE/img/1.jpg" ...
3
votes
2answers
232 views
Create friendly looking URL's with mod rewrite
I want to make the pages on my site more search engine friendly by turning the query strings into meaningful looking page names.
For example I have a page that is this:
/search.php?c=18
I want it ...
1
vote
2answers
222 views
.htaccess is not working in lease web hosting
.htaccess is not working.
http://www.example.com/index.php/user -- is working
http://www.example.com/user --- is not working
the following file is my .htaccess file.
RewriteEngine on
RewriteCond ...



