Apache :: How To Strip Unsolicited Chars At The End Of URL HTAccess
Jan 11, 2013
I use WordPress and one Template added .menu to all of my URLs. I changed my Template and i got many 404. I d like to strip the ".menu" chars at the end of each Url and use a 301 redirect for Google to find the new right URL.
I would like to redirect Url like"http://mydomain.com/my-url/.menu" to "http://mydomain.com/my-url/""http://mydomain.com/my-url-2/.menu" to "http://mydomain.com/my-url-2/""http://mydomain.com/my-url-3/.menu" to "http://mydomain.com/my-url-3/"... and so on ....
View 1 Replies
ADVERTISEMENT
Apr 1, 2013
My issue is with my code I have it rewwrites my addon domains to the main domain. I have a addon domain exclusion line. But each time I add a domain I have to go in and edit the htaccess. I foresee lots of addon domains in my future.
View 2 Replies
View Related
May 15, 2008
I am trying to figure out how to use mod_rewrite to make my php url's friendly. I have read a few articles but none seem to do what I want.
Here is what I want:
/login.php -> /login
/home.php -> /home
/users/update_profile.php -> /users/update_profile
/users/update_profile.php?id=343242 -> /users/update_profile/343242
Basically just strip off the .php extension, so it seems like php files are actually folders.
View 0 Replies
View Related
Mar 3, 2008
I have a load of PHP files that need trimming down, so for example
Code:
<html>
<?php
$loads_of_stuff = 1231231;
?>
</html>
change to
Code:
<html>
<?php
$loads_of_stuff = 1231231;
?>
</html>
There are 000's of lines, so some awk command or something similiar would be great to execute on each file.
View 1 Replies
View Related
Mar 9, 2009
I have been receiving unsolicited emails from a site which is hosted on DonHost servers in UK.
I have been receiving these emails for the last 3-4 days on my business email which is not on any list. I think the sender is complete amateur because he is using CC and I can see everyone's emails. They are mostly local companies and Government offices so they way this person gathered the email list is very questionable.
I contacted DonHost on www.donhost.co.uk and sent them an email to their Support but they haven't even replied to me.
View 14 Replies
View Related
Apr 22, 2009
LivePerson contacted our sales department without us having contacted them previously which opened the below support ticket in our sales department. This is very angering and only makes me take LivePerson totally out of my mind as an option for LiveChat or any of their other solutions in the future.
Way to go LivePerson!
Quote:
Originally Posted by LivePerson Spam
LivePerson
Sender: info@liveperson.com
Received: 04/22/2009 13:02
Subject: Better Customer Care at a Lower Cost: A Winning Strategy for Today's Economy
PayCycle, Inc., America's #1 online payroll service and recipient of the PC Magazine Editors' Choice Award, services 75,000 small business owners. Offering live chat has made their customers happy, as customer satisfaction ratings clearly demonstrate.
Find out how PayCycle, Inc. uses live chat to:
Provide real-time answers to customers who have questions while processing their payroll
Create a collaborative environment for their customer care specialists
Serve more customers at a lower cost
Download Casestudy:
[url]
Has anybody else gotten this junk?
View 14 Replies
View Related
Mar 22, 2008
I have the following Apache redirect code in .htaccess:
RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]
This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41
The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'
A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?
View 3 Replies
View Related
Jun 2, 2007
I am running into a bit of a problem. Previously, I can add an apache handler through cPanel easily... but now I moved to mediatemplate.net and that feature isn't available on their contol panel. Since they also run apache, I figured that I can set the apache handler manually through an .htaccess file - is that possible? If so, what is the syntax that will enable me to set .html files to be handled like .php files?
There is one setback to this process - this will be a manually inserted file for every directory that I want to do the above stated file handler. Is there an easier way to do this via SSH? I don't have root access, only normal user access.
View 3 Replies
View Related
Jun 2, 2009
Hi Htaccess not working in my server how Enable htaccess on Apache ?
View 14 Replies
View Related
Nov 3, 2009
im installing APACHe on windows server 2003 but .htacess not work on apache
View 4 Replies
View Related
Oct 23, 2014
I have been trying to figure out how to do a url rewrite but no luck so far.
How can I have this [URL] ....
as the default [URL] ....
View 2 Replies
View Related
Jan 26, 2014
I am have trouble using .htaccess and .htpasswd to password-protect a directory on my web server. How do I use .htaccess and .htpasswd to protect a directory?
View 3 Replies
View Related
Jul 17, 2013
I have a website. I would like to redirect all user/author url to one author/admin...e.g All aurthor links to redirect to one author link
author 1. mysite (dot) com/author/x
author 2. mysite (dot) com/author/y
author 3. mysite (dot) com/author/z
they are about 300
I would like all of them to redirect to author 2. mysite (dot) com/author/admin.
View 3 Replies
View Related
Jan 31, 2013
what is .htaccess file? use of this file?
View 6 Replies
View Related
Jan 25, 2013
I have a directory of /flash/1.swf all the way to /flash/4000.swf on my hosting.I am trying with terrible luck to load the flash movies into the container on zomgflash dot com(avoiding possible spam) -- its all setup...it should be loading the movies...I think it's a mod_rewrite problem but I could be wrong...it's basically a clone of iwantmoar dot com(avoiding spam again) -- you'll notice when you type a number after the domain like /238 or /2898 that it loads up /flash/238.swf or /flash/2898.swf into the flash container on the iwantmoar website. That's what I'm trying to get my website to do.
I need them shown like [URL] .... in the address bar... and that would have index.php load up 1.swf in the container if that makes more sense.This is the contents of my .htaccess from my relentless googling:
<IfModule mod_rewrite.c>
Rewrite-engine on
RewriteRule ^([0-9]+)$ /index.php [PT]
</IfModule>
ErrorDocument 404 /index.php
View 1 Replies
View Related
Jun 13, 2007
Does anybody know any solution to prevent this?
Basically every customer can bring server down with malformed htaccess.
Is there any solution to prevent this?
This doesn't help:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteOptions MaxRedirects=5
</IfModule>
this htaccess causes problems:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
View 6 Replies
View Related
May 11, 2013
I've not seen an answer for this mass 301 redirect issue specifically.. How to do this...
category/brand URLs:
redirect: /ID-some-brand (e.g. /43-religion-clothing or /26-ichiban) to: /some-brand (e.g. /religion-clothing or /ichiban)
Product URLs:
redirect: /some-category/ID-some-product-name.html (e.g. /mens-sweat-shirts/1543-ichiban-fairly-offensive-sweat-in-grey.html)
to: /some-product-name (e.g. /ichiban-fairly-offensive-sweat-in-grey)
We have 1,090 products and 60+ categories so some form of .htaccess trick would be amazing to know. What I could put in the .htaccess to accomplish this.
View 1 Replies
View Related
Jan 25, 2014
Well, I was trying to use the following in htaccess, but I get the message of redirect loop.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]
What I want to do is this: The URL is like somedomain.sub.com/somepage/s1/s2The index.php is accessible from somedomain.sub.com/somepage/I want to send s1/s2 as $_GET['page']
Also, I don't want the URL in the address bar to change, only the url sent to the server should change. This worked well in my localhost, but on webserver (0fees.net), it doesn't work ...
View 1 Replies
View Related
Jul 11, 2015
I have viewing the city names in my website like the following structure - [URL] ....
Here is the ,htaccess code - RewriteRule ^([^/]*)/([^/]*)/$ city.php?state=$1&city=$2 [NC]
But actually, I'm looking for to use wildcard subdomains that will rebuild the city names like the following structure-
city.mydomain.com/state/
I just need the htaccess rewrite code.
View 1 Replies
View Related
Feb 21, 2013
I have page like that : [URL] ....
I want to permanent redirect it to : [URL] ....
Also needs to redirect all another page have words ( rates ) to index.
View 9 Replies
View Related
Jun 11, 2014
I'd like to change /comp.php to /comp but I have only found articles on how to remove .php completely and I don't want to do that, only want to do it for this one file.
View 5 Replies
View Related
Sep 18, 2014
One site just linked to my website with incorrect URL as URL.. want to correct this by redirecting the URL to URL.... Therefore, I add the following line in my .htaccess, as follows: Redirect 301 /aor/%e2%80%9d URL...
However, this does not work. When I input URL... in Firefox or IE, the browser still said the page not found(404) error.
View 1 Replies
View Related
Jan 27, 2013
So, I would like my htaccess file to check if a file exists and if it doesn't then redirect to another file. How would I go about doing this?
View 5 Replies
View Related
Feb 20, 2013
Apache httpd Users mailing list, but nobody there has responded in several days. I'm using mod_alias to map URLs to directories that are outside of Apache's DocumentRoot. However, it seems that .htaccess files are being ignored in these directories.
View 6 Replies
View Related
Mar 18, 2013
I've modified my old website, and now need to remove the phrase "cheap-products"
Some example url's
randomdomain.com/product-1000-cheap-products/
randomdomain.com/product-1001-cheap-products/
randomdomain.com/product-1002-cheap-products/
How do I make it so it will forward (seo wise) to the following
randomdomain.com/product-1000/
randomdomain.com/product-1001/
randomdomain.com/product-1002/
View 4 Replies
View Related
Apr 15, 2013
I have learned some bits of regular expressions for simple scripting, writing a .htaccess file is, uh, syntaxically daunting.
THE CASE :
The URLs of my site used to be of the form [URL] ... . They are now of the form [URL]......
I am trying to perma-redirect (301) the old format (affiche_fiche.php) to the new format (fiche.php) using a .htaccess.
So far all I have achieved is a hatred of punctuation signs. What's the correct syntax to have a .htaccess that does the redirect ?
THE CONTEXT : The format change took place more than six months ago, but the Google Webmaster Tools still spits 450 problems a day with 404s on URLs using the old format. I had assumed that these would just fade away, but they don't. So I guess that 301'ing them is cleaner. Or would be, if I understood the syntax.
View 7 Replies
View Related
Feb 20, 2014
I want to upload the custom 404 error page and .htaccess file to my website but .htaccess is not working on my web server. I have use the correct file name and try it many time but no result I have found. My web server is Microsoft IIS 7.5
View 2 Replies
View Related
Feb 3, 2014
Google keeps indexing some of my articles in this form:
mywebsite.com/item/my-article
However I'm mainly using:
mywebsite.com/item/articles/my-article
So in a way I have duplicated content and also the first link does not show the modules I want. I want to create a .htaccess redirect than whenever someone joins on the first link to be automatically redirected to the second link.
View 5 Replies
View Related
Jul 7, 2009
trouble with users mis-using hot-linking feature, so he wants some restrictions to b set via htaccess
He has given me a code which is used for htaccess in apache, but he wants this to work in lighthttpd, I am not sure if this would work in lighthttpd htaccess,
this was the code given to me to b worked on:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
#allow hotlinking for thumbnails
RewriteCond %{REQUEST_URI} !_thumb
#allowed website to hotlink (don't forget to add your own site !!)
RewriteCond %{HTTP_REFERER} !^[url]
#display no-hotlink.jpg instead of the requested image
RewriteRule .(jpg|jpeg|gif|png|bmp|ico)$ [url]
can any one help me for getting this code re-written for lighthttpd version htaccess file and where to enter this code -- using hypervm/kloxo on his vps
View 5 Replies
View Related