htaccess issue with seo friendly urls - GoDaddy

0 votes

Here's what I've written in my htaccess file:

RewriteEngine On
RewriteRule ^category/([a-zA-Z0-9]+)$ category.php?location=$1

So the idea is to change mysite.com/category.php?location=londonto mysite.com/category/london.

Initially I though it may be an issue with the ability to mod rewrite being switched on on GoDaddy's end, so I contacted GoDaddy to see if it that was the case and their response was that: "Mod_rewrite is an Apache Web server module installed on all of our Linux servers by default; it does not have to be installed or enabled. Our Linux hosting accounts support most mod_rewrite functions. Because enabling mod_rewrite is handled at a global level, you do not need to enable it in your httpd.conf file. You only need to add the desired code to the body of your .htaccess file."

And they bascially implied that the error is not with them and with my code. I'm not very experienced with mod rewrites and it seemed to work fine when I wrote it like this on other servers. Is there something special you have to write with godaddy? Am I missing something?

Feb 27 in Others by Kichu
• 19,040 points
206 views

1 answer to this question.

0 votes
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /

  RewriteRule ^category/([a-zA-Z0-9_-]+)$ category.php?location=$1 [L]
</IfModule>
add this if statement as default 
answered Feb 28 by narikkadan
• 10,840 points

Related Questions In Others

+2 votes
2 answers

Is Reactjs SEO friendly? with google bots

Yes, with SERVER-SIDE RENDERING you will not face ...READ MORE

answered Feb 10 in Others by Shreesh
• 160 points
154 views
0 votes
1 answer
0 votes
1 answer

nginx clean url with seo friendly file names

server {     listen 80;     server_name example.com;     root   /full/server/path/to/your/cms;     index  index.php;     location / ...READ MORE

answered Feb 14 in Others by narikkadan
• 10,840 points
57 views
0 votes
1 answer

Generate SEO friendly URLs (slugs)

function format_uri( $string, $separator = '-' ) {     $accents_regex ...READ MORE

answered Feb 14 in Others by narikkadan
• 10,840 points
56 views
0 votes
0 answers

SEO friendly url using php

I wanted to use php to make ...READ MORE

Feb 18 in Others by Kichu
• 19,040 points
35 views
0 votes
1 answer

How can I create custom SEO-friendly URLs in OpenCart?

Index: catalog/controller/common/seo_url.php =================================================================== --- catalog/controller/common/seo_url.php (old) +++ catalog/controller/common/seo_url.php ...READ MORE

answered Feb 21 in Others by narikkadan
• 10,840 points
32 views
0 votes
1 answer

How to use $_GET parameter to make seo friendly urls?

What you can do is the following RewriteEngine ...READ MORE

answered Feb 27 in Others by narikkadan
• 10,840 points
137 views
0 votes
1 answer

AngularJS & Google Data Highlighter

https://support.google.com/webmasters/answer/2692911?hl=en just go through this and you ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 10,840 points
29 views
0 votes
1 answer

Generator URL Friendly SEO PHP with .htaccess

Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase / # skip all ...READ MORE

answered Feb 14 in Others by narikkadan
• 10,840 points
612 views
0 votes
1 answer

Creating SEO friendly urls using htaccess

its just a simple step just use ...READ MORE

answered Feb 20 in Others by narikkadan
• 10,840 points
30 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP