Hi Everyone.
I have a htaccess file the re-writes my urls for a directory on a website I am helping to develop for a friend.
the directory structure is mydomain.co.uk/dir1/dir2/shopping-cart/
The mod_rewrite rule rewrites the index.php file into pretty urls
for example:
shopping-cart/123/this-is-the-item-title
The problem I am facing is when we try and use the same htaccess for the mobile side
we get the internal server error.
The directory structure is the same for the mobile as it is for the desktop
Any help would be appreciated as we have been digging around for a few days now.
Here is the htaccess mod_rewrite condition we are using
Related Article:Custom 'missing image' Size via .htaccess File
is a PHP discussion thread by jonow that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: php, htaccess, missing, image, size.
Hi Pritaeas thanks for replying,
I have looked into the server error logs and that is indeed what it mentions.
The funny thing is the .htaccess file works for the website, I just get the error what viewing the mobile website url.
The error log does give some indication to why it produces the internal server error.
/m/webstores/ecommerce/shopping-cart/.htaccess: Invalid command '\xa0RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
the only issue I see here is the path /m/webstores/ etc
it is missing out the domain name as it should read /m/domainname.com/webstores etc
Should an invalid character of "\xa0" be there or we can simply use space "\x20"? or maybe the mod rewrite's not enabled? Although obviously it came right through "<IfModule mod_rewrite.c>"
Anyhow, can you check if this runs... withtou the "<IfModule mod_rewrite.c>"
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.|m\.)?mydomain\.co\.uk
RewriteRule ^(\d+)/([^/]+)/?$ index.php?uiid=$1&title=$2 [L]
Paste this in notepad to remove any formating, and remove any whitespace before "RewriteEngine on"
Hi Gon1387 - Just going to give this a try to see if it runs or not -
The '\xa0RewriteEngine' is inside the server error log & I have no idea what it is...
I will let you know if what you have suggested works
Thanks for replying...