Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
rewriterule
- Page 1
Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
… have problem with this htaccess in STATIC URL RewriteEngine On
RewriteRule
^readlex/(.*)$/?$ readlex.php?slug=$1 [NC,L] **DINAMIC URL** work…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
…: http://localhost/readlex/provvedimento-di-sospensione-trib-cagliari RewriteEngine On
RewriteRule
^readlex/(.+)$ readlex.php?slug=$1 [NC,L]
Re: Redirect non-www to www cons?
Digital Media
Digital Marketing
Search Engine Strategies
1 Month Ago
by Read a Book
… htaccess file to rewrite the URL's # Rewrite product URLs
RewriteRule
^product/index\.php$ - [L] RewriteCond %{QUERY_STRING} mainCategory=([^&]+)&…;productName=([^&]+)&product_id=([^&]+)
RewriteRule
^product/index\.php$ /product/%1/%2/%3? [L,R=…
Re: Redirect non-www to www cons?
Digital Media
Digital Marketing
Search Engine Strategies
1 Month Ago
by Read a Book
…` file ` # Redirect non-www to www RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule
^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] ` Is this good…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
I suppose I’m not properly understanding your question. Do you mean when you go to the URL in your browser localhost/mysite/readlex.php?slug=Le-mura-di-Lucca it doesn’t load, but when you go to the rewritten URL it works fine?
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
NO! I meant that URL loads but not friendly I have to put these STATIC URLs inside the text retrieved from the database as I cannot insert php strings. Example from database example that htaccess makes unfriendly : <em><a href="../read-lex.php?slug=Provvedimento-di-sospensione-Trib-Cagliari">Vedi SENTENZA&…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
I apologize because I am unclear. Difference between readlex and read_lex is my mistake Your htaccess example is right except that it doesn't work for me and I don't understand. Summary: In <head> I have this php: define("BASE_URL", "http://localhost/mysite/"); if($mod_rewrite == 'Off') { …
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
> In <head> I have this php: I see you have on line 3 `if($mod_rewrite == 'Off') {`. Where do you set the value of `$mod_rewrite`? How do you tell if it's Off or On? > Which I then recall in this link and htaccess works fine: Again, where do you set the values for `BASE_URL`? > The same link without Constant PHP: What …
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
I also think the problem is that with mod_rewrite on, READ_LEX begins with / and with mod_rewrite off, READ_LEX *ends* with /. Is the value of BASE_URL set to http://localhost/mysite or http://localhost/mysite/ ? You might be ending up with a URL that looks like http://localhost/mysitereadlex/slug instead of http://localhost/mysite/readlex/…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
> Where do you set the value of $mod_rewrite? I set On-Off $mod_rewrite in database from Dashboard Admin. Now is always ON. > Again, where do you set the values for BASE_URL? In Admin config.php // Defining base url define("BASE_URL", "http://localhost/mysite/"); > What do you mean by '…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
I expressed it badly. They are both dynamics. But: href="<?php echo BASE_URL.READ_LEX ?>Provvedimento-di-sospensione-Trib-Cagliari" // result = localhost/mysite/readlex/Provvedimento-di-sospensione-Trib-Cagliari href="localhost/mysite/readlex.php?slug=Provvedimento-di-sospensione-Trib-Cagliari" // …
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
Isn't that expected behavior?
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
Solved the problem with this htaccess in mode rewrite ON But I don't understand why. I have to enter friendly url directly href="<?php echo BASE_URL.READ_LEX ?>Provvedimento-di-sospensione-Trib-Cagliari" // OK result = localhost/mysite/readlex/Provvedimento-di-sospensione-Trib-Cagliari href="…
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Adolfo_1
Thank you for your patience
Re: Htaccess Problem Url Friendly
Programming
Web Development
1 Month Ago
by Dani
The .htaccess makes the URL accessible from a friendly URI. However, it does not change any of your HTML code for you. You will still need to modify all of your HTML code to link to the new friendly URI instead of the original URL.
Re: RewriteRule problem
Programming
Web Development
14 Years Ago
by kevindougans
… get internal server error.[/QUOTE] [CODE]Options +FollowSymLinks RewriteEngine on
RewriteRule
^en/([a-zA-Z0-9_]*)/([a-z0-9_]*)/([a-z0…&step=$2&function=$3&v1=$4 [NC]
RewriteRule
^en/([a-zA-Z0-9_]*)/([a-z0-9_]*)/([a-z0….php?uid=$1&step=$2&function=$3 [NC]
RewriteRule
^en/([a-zA-Z0-9_]*)/([a-z0-9_]*)/ index.php…
Re: RewriteRule problem
Programming
Web Development
14 Years Ago
by kevindougans
…am passing /index.php?mid=#&smid=# ???? Here is my
rewriterule
in htaccess: [code] Options +FollowSymlinks RewriteEngine On #RewriteCond %{…REQUEST_URI} !img/(.*)$ RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule
^(.+)$ /index.php?q=$1 [L] [/code] <snip> Please…
RewriteRule problem
Programming
Web Development
14 Years Ago
by sassenach
…am passing /index.php?mid=#&smid=# ???? Here is my
rewriterule
in htaccess: [code] Options +FollowSymlinks RewriteEngine On #RewriteCond %{REQUEST_URI…} !img/(.*)$ RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule
^(.+)$ /index.php?q=$1 [L] [/code] Here is what i…
Re: RewriteRule problem
Programming
Web Development
14 Years Ago
by sassenach
thanks for the code. im not sure why its not working
RewriteRule
^([a-zA-Z0-9_]*)/([a-z0-9_]*) /index.php?q=$1&step=$2 [NC]
RewriteRule
^([a-zA-Z0-9_]*) /index.php?q=$1 [NC] The last line works, but the first doesn't. i dont get it.
Re: RewriteRule problem
Programming
Web Development
14 Years Ago
by sassenach
when i add this line [code]
RewriteRule
^(.+)/^(.+)$ /index.php?q=$1&q2=$2 [NC] [/code] i get Internal Server Error. any ideas?
Re: RewriteRule problem
Programming
Web Development
14 Years Ago
by kevindougans
[QUOTE=sassenach;1147596]when i add this line i get Internal Server Error. any ideas?[/QUOTE] hey yeh try it without the additional ^ that i forgot to remove :-) soo..... [code]
RewriteRule
^(.+)/(.+)$ /index.php?q=$1&q2=$2 [NC] [/code]
RewriteRule Problem
Hardware and Software
Linux and Unix
14 Years Ago
by headedtomexico
… of subdomain.server.com mapped to server.com/subdomain [CODE]
RewriteRule
^dummyword/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+).png…
Re: RewriteRule For New Domain
Hardware and Software
Linux and Unix
13 Years Ago
by james.newell
[CODE] RewriteEngine On RewriteCond %{HTTP_HOST} domain-one\.com$ [NC]
RewriteRule
^cgi-bin/38837728.cgi$ http://somwhere-else.net/cgi-bin/abc/38837728.cgi [L,R=301] [/CODE] That should be pretty close.
Re: RewriteRule For New Domain
Hardware and Software
Linux and Unix
13 Years Ago
by james.newell
[CODE] RewriteEngine On RewriteCond %{HTTP_HOST} domain-one\.com$ [NC]
RewriteRule
^cgi-bin/38837728.cgi$ http://somwhere-else.net/cgi-bin/abc/38837728.cgi [L,R=301] [/CODE] That should be pretty close.
Re: RewriteRule For New Domain
Hardware and Software
Linux and Unix
13 Years Ago
by manojsamtani
Ya james is right but need to add one more RewriteCond: RewriteEngine On RewriteCond %{HTTP_HOST} ^domain-one\.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^www.domain-one\.com$ [NC]
RewriteRule
^cgi-bin/38837728.cgi$ [url]http://somwhere-else.net/cgi-bin/abc/38837728.cgi[/url] [L,R=301] I think, this will solve your rewrite rule problem. --- Manoj
.htaccess RewriteRule not working on some links
Programming
Web Development
10 Years Ago
by simplypixie
…['slug']; ?>/products"> // The
RewriteRule
RewriteRule
^shop/([a-zA-Z0-9_-]+)/products/?$ /shop/diesel…$faq['slug']; ?>"> //The RewiteRule
RewriteRule
^faqs/([a-zA-Z0-9_-]+)/?$ /faqs?slug=$1… // Also tried
RewriteRule
^faqs/([a-zA-Z0-9_-]+)/?$ /faqs.php…
RewriteCond and RewriteRule
Hardware and Software
Linux and Unix
19 Years Ago
by jvc
… the conditions and rules below RewriteCond %{REQUEST_URI} ^/kid.html [OR]
RewriteRule
^(.*)\.html$ - [C,E=id:24] RewriteCond %{REQUEST_URI} ^/baby.html [OR…]
RewriteRule
^(.*)\.html$ - [C,E=id:25]
RewriteRule
^(kid|baby)\.html$ /index.php?id=%{E:id…
How to rewrite to same RewriteRule
Programming
Web Development
13 Years Ago
by sci-kode
…]RewriteEngine On RewriteCond %{HTTP_HOST} !^myexample.com$
RewriteRule
(.*) http://myexample.com/$1 [R=301,L]
RewriteRule
^another-variable-in-url$ /index.php [L…]
RewriteRule
^another-variable-in-url$ /index.php?variable…
.htaccess RewriteRule Question
Programming
Web Development
12 Years Ago
by emailcrombiez
I have a pretty simple question about
RewriteRule
. I am using the isset($_GET['p']) function to call … RewriteCond %{http_host} ^www\.codershane\.com [NC]
RewriteRule
^(.*)$ http://codershane.com/$1 [R=301,NC]
RewriteRule
^/contact /index.php?p=contact [R=301…
Understanding htaccess RewriteRule
Programming
Web Development
9 Years Ago
by lloyd.farrell.7
Hi Everyone, I have the follow
RewriteRule
in my htaccess file that works as it should
RewriteRule
^(.*)$ /product.php?pid=$1 [QSA,L] If I wanted to add another product page would I just need to add
RewriteRule
^(.*)$ /productpage.php?ppge=$1 [QSA,L] for the Rule to work correctly? Thanks in advance
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC